# {{ ansible_managed }} [DEFAULT] log_config_append = /etc/monasca/api-logging.conf # Identifies the region that the Monasca API is running in. region = {{ keystone_service_region }} # Dispatchers to be loaded to serve restful APIs [dispatcher] versions = monasca_api.v2.reference.versions:Versions version_2_0 = monasca_api.v2.reference.version_2_0:Version2 metrics = monasca_api.v2.reference.metrics:Metrics metrics_measurements = monasca_api.v2.reference.metrics:MetricsMeasurements metrics_statistics = monasca_api.v2.reference.metrics:MetricsStatistics metrics_names = monasca_api.v2.reference.metrics:MetricsNames alarm_definitions = monasca_api.v2.reference.alarm_definitions:AlarmDefinitions alarms = monasca_api.v2.reference.alarms:Alarms alarms_count = monasca_api.v2.reference.alarms:AlarmsCount alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory notification_methods = monasca_api.v2.reference.notifications:Notifications dimension_values = monasca_api.v2.reference.metrics:DimensionValues dimension_names = monasca_api.v2.reference.metrics:DimensionNames notification_method_types = monasca_api.v2.reference.notificationstype:NotificationsType healthchecks = monasca_api.healthchecks:HealthChecks [security] # The roles that are allowed full access to the API. default_authorized_roles = {{ monasca_user_roles | join(', ') }} # The roles that are allowed to only POST metrics to the API. This role would be used by the Monasca Agent. agent_authorized_roles = {{ monasca_agent_roles | join(', ') }} # The roles that are allowed to only GET metrics from the API. read_only_authorized_roles = {{ monasca_read_only_user_roles | join(', ') }} # The roles that are allowed to access the API on behalf of another tenant. # For example, a service can POST metrics to another tenant if they are a member of the "delegate" role. delegate_authorized_roles = admin [messaging] # The message queue driver to use driver = monasca_api.common.messaging.kafka_publisher:KafkaPublisher [repositories] # The driver to use for the metrics repository metrics_driver = monasca_api.common.repositories.influxdb.metrics_repository:MetricsRepository # The driver to use for the alarm definitions repository alarm_definitions_driver = monasca_api.common.repositories.sqla.alarm_definitions_repository:AlarmDefinitionsRepository # The driver to use for the alarms repository alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRepository # The driver to use for the notifications repository notifications_driver = monasca_api.common.repositories.sqla.notifications_repository:NotificationsRepository # The driver to use for the notification method type repository notification_method_type_driver = monasca_api.common.repositories.sqla.notification_method_type_repository:NotificationMethodTypeRepository [dispatcher] driver = v2_reference [kafka] # The endpoint to the kafka server uri = {{ kafka_hosts }} # The topic that metrics will be published too metrics_topic = metrics # The topic that events will be published too events_topic = events # The topic that alarm state will be published too alarm_state_transitions_topic = alarm-state-transitions # consumer group name group = api # how many times to try when error occurs max_retry = 3 # wait time between tries when kafka goes down wait_time = 1 # use synchronous or asynchronous connection to kafka async = False # send messages in bulk or send messages one by one. compact = False # How many partitions this connection should listen messages on, this # parameter is for reading from kafka. If listens on multiple partitions, # For example, if the client should listen on partitions 1 and 3, then the # configuration should look like the following: # partitions = 1 # partitions = 3 # default to listen on partition 0. partitions = 0 [influxdb] # The IP address of the InfluxDB service. ip_address = {{ monasca_influxdb_host }} # The port number that the InfluxDB service is listening on. port = {{ monasca_influxdb_port }} # The username to authenticate with. user = {{ monasca_api_influxdb_user }} # The password to authenticate with. password = {{ monasca_api_influxdb_password }} # The name of the InfluxDB database to use. database_name = {{ monasca_influxdb_database }} [database] connection = "mysql+pymysql://{{ monasca_galera_user }}:{{ monasca_container_mysql_password }}@{{ monasca_galera_address }}/{{ monasca_galera_database }}?charset=utf8mb4" [keystone_authtoken] insecure = {{ keystone_service_internaluri_insecure | bool }} auth_type = {{ monasca_keystone_auth_plugin }} auth_url = {{ keystone_service_adminuri }} www_authenticate_uri = {{ keystone_service_internaluri }} project_domain_id = {{ monasca_service_project_domain_id }} user_domain_id = {{ monasca_service_user_domain_id }} project_name = {{ monasca_service_project_name }} username = {{ monasca_service_user_name }} password = {{ monasca_service_password }} region_name = {{ keystone_service_region }} service_token_roles_required = True memcached_servers = {{ memcached_servers }} token_cache_time = 300 # if your memcached server is shared, use these settings to avoid cache poisoning memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcached_encryption_key }}