Receive polling-batch-size config
Samples collected can be batched together, consequently increasing or reducing the amount of API calls and body data sent to the configured publisher. This config is available since Rocky, receiving the value from ceilometer-charm to allow its tuning. Change-Id: I986073fdacd750cf96d662abf1d58844479c25ba Closes-bug: #1885190
This commit is contained in:
parent
27ad8cb103
commit
2aace2fb69
|
@ -49,6 +49,7 @@ class CeilometerServiceContext(OSContextGenerator):
|
|||
'service_port',
|
||||
'signing_dir',
|
||||
'api_version',
|
||||
'polling_batch_size',
|
||||
]
|
||||
|
||||
optional_keys = [
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
# rocky
|
||||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# ceilometer configuration file maintained by Juju
|
||||
# local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
debug = {{ debug }}
|
||||
verbose = {{ verbose }}
|
||||
logdir = /var/log/ceilometer
|
||||
|
||||
{% if transport_url -%}
|
||||
transport_url = {{ transport_url }}
|
||||
{%- endif %}
|
||||
|
||||
{% if service_host -%}
|
||||
[service_credentials]
|
||||
{% if use_internal_endpoints -%}
|
||||
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
|
||||
interface = internalURL
|
||||
{% else -%}
|
||||
auth_url = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
{% endif -%}
|
||||
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 -%}
|
||||
|
||||
[polling]
|
||||
{% if polling_batch_size -%}
|
||||
batch_size = {{ polling_batch_size }}
|
||||
{% endif -%}
|
||||
|
||||
{% if metering_secret -%}
|
||||
[publisher]
|
||||
telemetry_secret = {{ metering_secret }}
|
||||
{% endif -%}
|
||||
|
||||
{% include "section-keystone-authtoken-mitaka" %}
|
||||
|
||||
{% include "section-oslo-messaging-rabbit-ocata" %}
|
|
@ -56,7 +56,8 @@ class CeilometerContextsTest(CharmTestCase):
|
|||
'admin_tenant_name': 'admin',
|
||||
'admin_user': 'admin',
|
||||
'admin_password': 'password',
|
||||
'metering_secret': 'secret'
|
||||
'metering_secret': 'secret',
|
||||
'polling_batch_size': 50,
|
||||
}
|
||||
self.test_relation.set(data)
|
||||
self.assertEqual(contexts.CeilometerServiceContext()(), data)
|
||||
|
|
Loading…
Reference in New Issue