Support Prometheus as metrics database for Ceilometer

This commit adds support for pushing Ceilometer metrics
to Prometheus instead of Gnocchi or alongside it.


Closes-Bug: #1964135
Signed-off-by: Juan Pablo Suazo <jsuazo@whitestack.com>
Change-Id: I9fd32f63913a534c59e2d17703702074eea5dd76
This commit is contained in:
Juan Pablo Suazo 2022-03-08 11:59:27 -03:00
parent 668fecf397
commit 6cf03122ee
5 changed files with 22 additions and 2 deletions

View File

@ -605,6 +605,7 @@ enable_barbican: "no"
enable_blazar: "no" enable_blazar: "no"
enable_ceilometer: "no" enable_ceilometer: "no"
enable_ceilometer_ipmi: "no" enable_ceilometer_ipmi: "no"
enable_ceilometer_prometheus_pushgateway: "no"
enable_cells: "no" enable_cells: "no"
enable_central_logging: "no" enable_central_logging: "no"
enable_ceph_rgw: "no" enable_ceph_rgw: "no"

View File

@ -182,6 +182,12 @@ ceilometer_ks_users:
# Backend # Backend
#################### ####################
ceilometer_database_type: "gnocchi" ceilometer_database_type: "{{ 'gnocchi' if (enable_gnocchi | bool) else '' }}"
ceilometer_upgrade_params: "" ceilometer_upgrade_params: ""
####################
# Pushgateway
####################
ceilometer_prometheus_pushgateway_host: "127.0.0.1"
ceilometer_prometheus_pushgateway_port: "9091"

View File

@ -12,4 +12,4 @@
changed_when: false changed_when: false
when: when:
- enable_ceilometer | bool - enable_ceilometer | bool
- not enable_gnocchi | bool - not (enable_gnocchi | bool or enable_ceilometer_prometheus_pushgateway | bool)

View File

@ -8,4 +8,9 @@ sources:
sinks: sinks:
- name: meter_sink - name: meter_sink
publishers: publishers:
{% if enable_gnocchi | bool %}
- gnocchi:// - gnocchi://
{% endif %}
{% if enable_ceilometer_prometheus_pushgateway | bool %}
- prometheus://{{ ceilometer_prometheus_pushgateway_host }}:{{ ceilometer_prometheus_pushgateway_port }}/metrics/job/openstack-telemetry
{% endif %}

View File

@ -0,0 +1,8 @@
---
features:
- |
Adds the ability to use Prometheus as the metrics database for Ceilometer.
Adapts Ceilometer configurations so metrics can be pushed to a Prometheus
Pushgateway.
`LP#1964135 <https://bugs.launchpad.net/kolla-ansible/+bug/1964135>`__