Merge "Set event,meter_dispatchers=database explicitly when used with MongoDB"

This commit is contained in:
Jenkins 2017-08-31 09:27:30 +00:00 committed by Gerrit Code Review
commit 76569acedd
2 changed files with 67 additions and 0 deletions

View File

@ -13,6 +13,9 @@ event_pipeline_cfg_file = /etc/ceilometer/event_pipeline_alarm.yaml
{% if gnocchi_url -%}
meter_dispatchers = gnocchi
event_dispatchers = gnocchi
{% elif db_host or db_mongo_servers -%}
meter_dispatchers = database
event_dispatchers = database
{%- endif %}
[api]

View File

@ -0,0 +1,64 @@
# ocata
###############################################################################
# [ WARNING ]
# ceilometer configuration file maintained by Juju
# local changes may be overwritten.
###############################################################################
[DEFAULT]
debug = {{ debug }}
verbose = {{ verbose }}
use_syslog = {{ use_syslog }}
event_pipeline_cfg_file = /etc/ceilometer/event_pipeline_alarm.yaml
{% if gnocchi_url -%}
meter_dispatchers = gnocchi
event_dispatchers = gnocchi
{% elif db_host or db_mongo_servers -%}
meter_dispatchers = database
{%- endif %}
[api]
port = {{ port }}
workers = {{ api_workers }}
{% if service_host -%}
[service_credentials]
auth_url = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
project_name = {{ admin_tenant_name }}
username = {{ admin_user }}
password = {{ admin_password }}
{% if api_version == "3" -%}
project_domain_name = {{ admin_domain_name }}
user_domain_name = {{ admin_domain_name }}
{% else -%}
project_domain_name = default
user_domain_name = default
{% endif -%}
auth_type = password
{% endif -%}
{% if db_host or db_mongo_servers -%}
[database]
{% if db_replset: -%}
connection = mongodb://{{ db_mongo_servers }}/{{ db_name }}?readPreference=primaryPreferred&replicaSet={{ db_replset }}
mongodb_replica_set = {{ db_replset }}
{% else -%}
connection = mongodb://{{ db_host }}:{{ db_port }}/{{ db_name }}
{% endif %}
metering_time_to_live = {{ metering_time_to_live }}
event_time_to_live = {{ event_time_to_live }}
{%- endif %}
[publisher]
telemetry_secret = {{ metering_secret }}
{% if gnocchi_url -%}
[dispatcher_gnocchi]
filter_service_activity = False
archive_policy = {{ archive_policy }}
url = {{ gnocchi_url }}
{%- endif %}
{% include "section-keystone-authtoken-mitaka" %}
{% include "section-rabbitmq-oslo" %}