| {%- from "gnocchi/map.jinja" import cfg,server,statsd with context %} |
| {%- set storage = cfg.get('storage', {}) %} |
| {%- set _database = cfg.database %} |
| |
| {%- set connection_x509_ssl_option = '' %} |
| {%- if _database.get('x509',{}).get('enabled',False) %} |
| {%- set connection_x509_ssl_option = '&ssl_ca=' ~ _database.x509.ca_file ~ '&ssl_cert=' ~ _database.x509.cert_file ~ '&ssl_key=' ~ _database.x509.key_file %} |
| {%- elif _database.get('ssl',{}).get('enabled',False) %} |
| {%- set connection_x509_ssl_option = '&ssl_ca=' ~ _database.ssl.get('cacert_file', cfg.cacert_file) %} |
| {%- endif %} |
| |
| [DEFAULT] |
| |
| # |
| # From cotyledon |
| # |
| |
| # Enables or disables logging values of all registered options when starting a |
| # service (at DEBUG level). (boolean value) |
| # Note: This option can be changed without restarting. |
| #log_options = true |
| |
| # Specify a timeout after which a gracefully shutdown server will exit. Zero |
| # value means endless wait. (integer value) |
| # Note: This option can be changed without restarting. |
| #graceful_shutdown_timeout = 60 |
| |
| # |
| # From gnocchi |
| # |
| |
| # If set to true, the logging level will be set to DEBUG. (boolean value) |
| #debug = false |
| debug = {{ cfg.debug }} |
| |
| # If set to true, the logging level will be set to INFO. (boolean value) |
| #verbose = true |
| |
| # Base directory for log files. If not set, logging will go to stderr. (string |
| # value) |
| #log_dir = <None> |
| |
| # (Optional) Name of log file to send logging output to. If no default is set, |
| # logging will go to stderr as defined by use_stderr. (string value) |
| #log_file = <None> |
| |
| # Coordination driver URL (string value) |
| #coordination_url = <None> |
| {%- if cfg.coordination_backend is defined %} |
| coordination_url = {{ cfg.coordination_backend.url }} |
| {%- endif %} |
| |
| # Number of threads to use to parallelize some operations. Default is set to |
| # the number of CPU available. (integer value) |
| # Minimum value: 1 |
| # Deprecated group/name - [storage]/aggregation_workers_number |
| #parallel_operations = <None> |
| {%- if storage.aggregation_workers is defined %} |
| parallel_operations = {{ storage.aggregation_workers }} |
| {%- elif cfg.parallel_operations is defined %} |
| parallel_operations = {{ cfg.parallel_operations }} |
| {%- endif %} |
| |
| # Use syslog for logging. (boolean value) |
| #use_syslog = false |
| {%- if cfg.use_syslog is defined %} |
| use_syslog = {{ cfg.use_syslog }} |
| {%- endif %} |
| |
| # Enable journald for logging. If running in a systemd environment you may wish |
| # to enable journal support. Doing so will use the journal native protocol |
| # which includes structured metadata in addition to log messages. (boolean |
| # value) |
| #use_journal = false |
| {%- if cfg.use_journal is defined %} |
| use_journal = {{ cfg.use_journal }} |
| {%- endif %} |
| |
| # Syslog facility to receive log lines. (string value) |
| #syslog_log_facility = user |
| {%- if cfg.syslog_log_facility is defined %} |
| syslog_log_facility = {{ cfg.syslog_log_facility }} |
| {%- endif %} |
| |
| [api] |
| |
| # |
| # From gnocchi |
| # |
| |
| # Path to API Paste configuration. (string value) |
| #paste_config = api-paste.ini |
| |
| # Authentication mode to use. (string value) |
| # Possible values: |
| # remoteuser - <No description provided> |
| # keystone - <No description provided> |
| # basic - <No description provided> |
| #auth_mode = basic |
| auth_mode = {{ server.identity.engine }} |
| |
| # The maximum number of items returned in a single response from a collection |
| # resource (integer value) |
| #max_limit = 1000 |
| {%- if server.get('api', {}).max_limit is defined %} |
| max_limit = {{ server.api.max_limit }} |
| {%- endif %} |
| |
| # Number of seconds before timeout when attempting to do some operations. |
| # (integer value) |
| # Minimum value: 0 |
| # Deprecated group/name - [api]/refresh_timeout |
| #operation_timeout = 10 |
| {%- if server.get('api', {}).refresh_timeout is defined %} |
| operation_timeout = {{ server.api.refresh_timeout }} |
| {%- elif server.api.operation_timeout is defined %} |
| operation_timeout = {{ server.api.operation_timeout }} |
| {%- endif %} |
| |
| # Host to listen on (host address value) |
| #host = 0.0.0.0 |
| |
| # Port to listen on (port value) |
| # Minimum value: 0 |
| # Maximum value: 65535 |
| #port = 8041 |
| |
| # Socket type to use for uWSGI: |
| # * http: support HTTP/1.1 and keepalive, |
| # but not chunked encoding (InfluxDB) |
| # * http-socket/socket: support chunked encoding, but require a upstream HTTP |
| # Server for HTTP/1.1, keepalive and HTTP protocol correctness. |
| # (string value) |
| # Possible values: |
| # http - <No description provided> |
| # http-socket - <No description provided> |
| # socket - <No description provided> |
| #uwsgi_mode = http |
| |
| [archive_policy] |
| |
| # |
| # From gnocchi |
| # |
| |
| # Default aggregation methods to use in created archive policies (list value) |
| #default_aggregation_methods = mean,min,max,sum,std,count |
| {%- if server.get('archive_policy', {}).default_aggregation_methods is defined %} |
| default_aggregation_methods = {{ ','.join(server.archive_policy.default_aggregation_methods) }} |
| {%- endif %} |
| |
| [cors] |
| |
| {%- if server.cors is defined %} |
| {%- set _data = server.cors %} |
| {%- include "oslo_templates/files/rocky/oslo/_cors.conf" %} |
| {%- endif %} |
| |
| [incoming] |
| |
| {%- set _storage = storage.get('incoming', {}) %} |
| {%- if _storage.driver is defined %} |
| driver = {{ _storage.driver }} |
| {% include "gnocchi/files/" + cfg.version|string + "/storage/_" + _storage.driver + ".conf" %} |
| {%- endif %} |
| |
| [indexer] |
| |
| # |
| # From gnocchi |
| # |
| |
| # Indexer driver to use (string value) |
| #url = <None> |
| url = {{ cfg.database.engine }}+pymysql://{{ cfg.database.user }}:{{ cfg.database.password }}@{{ cfg.database.host }}/{{ cfg.database.name }}?charset=utf8{{ connection_x509_ssl_option|string }} |
| |
| |
| {%- if server.identity.engine == 'keystone' %} |
| [keystone_authtoken] |
| |
| {%- set _data = server.identity %} |
| {%- if 'cacert_file' not in _data.keys() %}{% do _data.update({'cacert_file': server.cacert_file}) %}{% endif %} |
| {%- set auth_type = _data.get('auth_type', 'password') %} |
| {%- if server.get('cache',{}).members is defined and 'cache' not in _data.keys() %} |
| {% do _data.update({'cache': server.cache}) %} |
| {%- endif %} |
| {%- include "oslo_templates/files/rocky/keystonemiddleware/_auth_token.conf" %} |
| {%- include "oslo_templates/files/rocky/keystoneauth/_type_" + auth_type + ".conf" %} |
| {%- endif %} |
| |
| [oslo_middleware] |
| {%- set _data = server %} |
| {%- include "oslo_templates/files/rocky/oslo/_middleware.conf" %} |
| |
| [oslo_policy] |
| {%- if server.policy is defined %} |
| {%- set _data = server.policy %} |
| {%- include "oslo_templates/files/rocky/oslo/_policy.conf" %} |
| {%- endif %} |
| |
| [statsd] |
| |
| # |
| # From gnocchi |
| # |
| |
| # The listen IP for statsd (host address value) |
| #host = 0.0.0.0 |
| {%- if statsd.get('bind', {}).address is defined %} |
| host = {{ statsd.bind.address }} |
| {%- endif %} |
| |
| # The port for statsd (port value) |
| # Minimum value: 0 |
| # Maximum value: 65535 |
| #port = 8125 |
| {%- if statsd.get('bind', {}).port is defined %} |
| port = {{ statsd.bind.port }} |
| {%- endif %} |
| |
| # Resource UUID to use to identify statsd in Gnocchi (unknown value) |
| #resource_id = <None> |
| {%- if statsd.get('enabled', False) %} |
| resource_id = {{ statsd.resource_id }} |
| {%- endif %} |
| |
| # Creator value to use to identify statsd in Gnocchi (string value) |
| #creator = <None> |
| {%- if statsd.user_id is defined and statsd.project_id is defined %} |
| creator = {{ statsd.user_id }}:{{ statsd.project_id }} |
| {%- endif %} |
| |
| # Archive policy name to use when creating metrics (string value) |
| #archive_policy_name = <None> |
| {%- if statsd.archive_policy_name is defined %} |
| archive_policy_name = {{ statsd.archive_policy_name }} |
| {%- endif %} |
| |
| # Delay between flushes (floating point value) |
| #flush_delay = 10 |
| {%- if statsd.flush_delay is defined %} |
| flush_delay = {{ statsd.flush_delay }} |
| {%- endif %} |
| |
| |
| [storage] |
| {%- set _storage = storage %} |
| {%- if _storage.driver is defined %} |
| driver = {{ _storage.driver }} |
| {% include "gnocchi/files/" + cfg.version|string + "/storage/_" + _storage.driver + ".conf" %} |
| {%- endif %} |
| |
| file_basepath = /var/lib/gnocchi |