kolla-ansible/ansible/roles/monasca/defaults/main.yml
Doug Szumski 75d095b64e Automatically configure Monasca Grafana datasource
In Kolla, an OpenStack project is created to store logs and metrics
harvested from the control plane by Monasca. This commit enables
the Monasca Datasource in the Grafana organisation which maps to
this OpenStack control plane project. What this means in practice
is that if a user logs into Monasca Grafana, and has access to the
the control plane project, they will immediately be able to create
dashboards using data from Monasca which has been gathered from the
control plane.

Support to enable creation of this datasource for other OpenStack
projects can be added in a separate commit.

Partially-Implements: blueprint monasca-grafana
Change-Id: I03e741ddb1c582b7280c64637ed3e3683df6419b
2018-11-07 20:24:41 +00:00

313 lines
14 KiB
YAML

---
project_name: "monasca"
monasca_services:
monasca-api:
container_name: monasca_api
group: monasca-api
enabled: true
image: "{{ monasca_api_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_api_dimensions }}"
haproxy:
monasca_api:
enabled: "{{ enable_monasca }}"
mode: "http"
external: false
port: "{{ monasca_api_port }}"
monasca_api_external:
enabled: "{{ enable_monasca }}"
mode: "http"
external: true
port: "{{ monasca_api_port }}"
monasca-log-api:
container_name: monasca_log_api
group: monasca-log-api
enabled: true
image: "{{ monasca_log_api_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-log-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_log_api_dimensions }}"
haproxy:
monasca_log_api:
enabled: "{{ enable_monasca }}"
mode: "http"
external: false
port: "{{ monasca_log_api_port }}"
monasca_log_api_external:
enabled: "{{ enable_monasca }}"
mode: "http"
external: true
port: "{{ monasca_log_api_port }}"
monasca-log-transformer:
container_name: monasca_log_transformer
group: monasca-log-transformer
enabled: true
image: "{{ monasca_logstash_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-log-transformer/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_log_transformer_dimensions }}"
monasca-log-persister:
container_name: monasca_log_persister
group: monasca-log-persister
enabled: true
image: "{{ monasca_logstash_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-log-persister/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_log_persister_dimensions }}"
monasca-log-metrics:
container_name: monasca_log_metrics
group: monasca-log-metrics
enabled: true
image: "{{ monasca_logstash_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-log-metrics/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_log_metrics_dimensions }}"
monasca-thresh:
container_name: monasca_thresh
group: monasca-thresh
enabled: true
image: "{{ monasca_thresh_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-thresh/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "monasca_thresh:/var/lib/monasca-thresh/"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_thresh_dimensions }}"
monasca-notification:
container_name: monasca_notification
group: monasca-notification
enabled: true
image: "{{ monasca_notification_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-notification/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_notification_dimensions }}"
monasca-persister:
container_name: monasca_persister
group: monasca-persister
enabled: true
image: "{{ monasca_persister_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-persister/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_persister_dimensions }}"
monasca-agent-collector:
container_name: monasca_agent_collector
group: monasca-agent-collector
enabled: true
image: "{{ monasca_agent_image_full }}"
pid_mode: "host"
volumes:
- "{{ node_config_directory }}/monasca-agent-collector/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
- "/sys:/sys:ro"
- "/dev/disk/:/dev/disk:ro"
dimensions: "{{ monasca_agent_dimensions }}"
monasca-agent-statsd:
container_name: monasca_agent_statsd
group: monasca-agent-statsd
enabled: true
image: "{{ monasca_agent_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-agent-statsd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_agent_dimensions }}"
monasca-agent-forwarder:
container_name: monasca_agent_forwarder
group: monasca-agent-forwarder
enabled: true
image: "{{ monasca_agent_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-agent-forwarder/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
dimensions: "{{ monasca_agent_dimensions }}"
monasca-grafana:
container_name: monasca_grafana
group: monasca-grafana
enabled: true
image: "{{ monasca_grafana_image_full }}"
volumes:
- "{{ node_config_directory }}/monasca-grafana/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "monasca_grafana:/var/lib/grafana/"
- "kolla_logs:/var/log/kolla/"
dimensions: "{{ monasca_grafana_dimensions }}"
haproxy:
monasca_grafana_server:
enabled: "{{ enable_monasca }}"
mode: "http"
external: false
port: "{{ monasca_grafana_server_port }}"
monasca_grafana_server_external:
enabled: "{{ enable_monasca }}"
mode: "http"
external: true
port: "{{ monasca_grafana_server_port }}"
####################
# Databases
####################
monasca_database_name: "monasca"
monasca_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}monasca{% endif %}"
monasca_grafana_database_name: "monasca_grafana"
monasca_database_address: "{{ database_address }}"
monasca_database_port: "{{ database_port }}"
monasca_influxdb_name: "monasca"
monasca_influxdb_address: "{{ kolla_internal_fqdn }}"
monasca_influxdb_http_port: "{{ influxdb_http_port }}"
monasca_influxdb_retention_policy:
name: 'monasca_metrics'
duration: "1w"
replication_count: 1
####################
# Monasca
####################
monasca_kafka_servers: "{% for host in groups['kafka'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ kafka_port }}{% if not loop.last %},{% endif %}{% endfor %}"
monasca_zookeeper_servers: "{% for host in groups['zookeeper'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ zookeeper_client_port }}{% if not loop.last %},{% endif %}{% endfor %}"
monasca_memcached_servers: "{% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}"
monasca_elasticsearch_servers: "{% for host in groups['elasticsearch'] %}'{{ internal_protocol }}://{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ elasticsearch_port }}'{% if not loop.last %},{% endif %}{% endfor %}"
monasca_storm_nimbus_servers: "{% for host in groups['storm-nimbus'] %}'{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}'{% if not loop.last %},{% endif %}{% endfor %}"
# Kafka topics used by Monasca services
monasca_metrics_topic: "metrics"
monasca_raw_logs_topic: "logs"
monasca_transformed_logs_topic: "transformed-logs"
monasca_events_topic: "events"
monasca_alarm_state_transitions_topic: "alarm-state-transitions"
monasca_alarm_notifications_topic: "alarm-notifications"
monasca_alarm_notifications_retry_topic: "retry-notifications"
monasca_periodic_notifications_topic: "60-seconds-notifications"
# NOTE(dszumski): Due to the way monasca-notification is currently
# implemented it is not recommended to change this period.
monasca_periodic_notifications_period: 60
# Agent settings
monasca_agent_max_buffer_size: 1000
monasca_agent_backlog_send_rate: 1000
monasca_agent_max_batch_size: 1000
monasca_agent_check_frequency: 30
# Processing pipeline threads. In a large scale deployment you will likely
# want to tune these with finer precision. For example, if you have a very
# high log throughput, the log metrics service consumer may require a
# higher thread count than the producer. You will also want to ensure that
# the total number of threads across all instances of a service does not
# exceed the Kafka topic partition count.
monasca_log_pipeline_threads: 2
monasca_metric_pipeline_threads: 2
# Local password for Grafana. This account allows you to bypass Keystone
# authentication. This must *not* match any OpenStack username.
monasca_grafana_admin_username: "grafana_local_admin"
monasca_grafana_data_sources:
monasca:
enabled: True
data:
name: "Monasca API"
type: "monasca-datasource"
access: "proxy"
url: "{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ monasca_api_port }}"
isDefault: True
basicAuth: false
jsonData:
keystoneAuth: True
####################
# Docker
####################
# NOTE(dszumski): Binary support for Monasca images is not yet available in Kolla
monasca_install_type: "{{ kolla_install_type }}"
monasca_tag: "{{ openstack_release }}"
monasca_agent_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-agent"
monasca_agent_tag: "{{ monasca_tag }}"
monasca_agent_image_full: "{{ monasca_agent_image }}:{{ monasca_agent_tag }}"
monasca_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-api"
monasca_api_tag: "{{ monasca_tag }}"
monasca_api_image_full: "{{ monasca_api_image }}:{{ monasca_api_tag }}"
monasca_log_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-log-api"
monasca_log_api_tag: "{{ monasca_tag }}"
monasca_log_api_image_full: "{{ monasca_log_api_image }}:{{ monasca_log_api_tag }}"
monasca_logstash_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-logstash"
monasca_logstash_tag: "{{ monasca_tag }}"
monasca_logstash_image_full: "{{ monasca_logstash_image }}:{{ monasca_logstash_tag }}"
monasca_thresh_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-thresh"
monasca_thresh_tag: "{{ monasca_tag }}"
monasca_thresh_image_full: "{{ monasca_thresh_image }}:{{ monasca_thresh_tag }}"
monasca_notification_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-notification"
monasca_notification_tag: "{{ monasca_tag }}"
monasca_notification_image_full: "{{ monasca_notification_image }}:{{ monasca_notification_tag }}"
monasca_persister_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-persister"
monasca_persister_tag: "{{ monasca_tag }}"
monasca_persister_image_full: "{{ monasca_persister_image }}:{{ monasca_persister_tag }}"
monasca_grafana_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ monasca_install_type }}-monasca-grafana"
monasca_grafana_tag: "{{ monasca_tag }}"
monasca_grafana_image_full: "{{ monasca_grafana_image }}:{{ monasca_grafana_tag }}"
monasca_agent_dimensions: "{{ default_container_dimensions }}"
monasca_api_dimensions: "{{ default_container_dimensions }}"
monasca_log_api_dimensions: "{{ default_container_dimensions }}"
monasca_log_transformer_dimensions: "{{ default_container_dimensions }}"
monasca_log_persister_dimensions: "{{ default_container_dimensions }}"
monasca_log_metrics_dimensions: "{{ default_container_dimensions }}"
monasca_thresh_dimensions: "{{ default_container_dimensions }}"
monasca_notification_dimensions: "{{ default_container_dimensions }}"
monasca_persister_dimensions: "{{ default_container_dimensions }}"
monasca_grafana_dimensions: "{{ default_container_dimensions }}"
####################
# OpenStack
####################
monasca_openstack_auth: "{{ openstack_auth }}"
monasca_keystone_user: "monasca"
monasca_default_authorized_roles:
- admin
monasca_read_only_authorized_roles:
- monasca-read-only-user
# NOTE(dszumski): The first role in this list is assigned to the monasca-agent
# user for monitoring the OpenStack deployment.
monasca_agent_authorized_roles:
- agent
monasca_delegate_authorized_roles:
- admin
monasca_api_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ monasca_api_port }}/v2.0"
monasca_api_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ monasca_api_port }}/v2.0"
monasca_api_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ monasca_api_port }}/v2.0"
monasca_log_api_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ monasca_log_api_port }}"
monasca_log_api_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ monasca_log_api_port }}"
monasca_log_api_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ monasca_log_api_port }}"
monasca_logging_debug: "{{ openstack_logging_debug }}"