add support for rabbitmq

This commit is contained in:
solen.bellouati
2025-05-20 14:40:05 +02:00
parent 603575ef4f
commit 00808cdd68
4 changed files with 1844 additions and 2 deletions

View File

@ -18,6 +18,7 @@ The present role :
- elasticsearch
- nginx
- opensearch (via plugin for opensearch https://github.com/aiven/prometheus-exporter-plugin-for-opensearch)
- rabbitmq
- Deploys Grafana with a dashboard for each exporter configured.
- Supports deploying VictoriaMetrics as the Prometheus backend.

File diff suppressed because it is too large Load Diff

View File

@ -302,3 +302,13 @@
mode: '0750'
when: prometheus_elasticsearch_exporter_targets is defined
notify: "grafana-prometheus-restart"
- name: "grafana-prometheus | import grafana rabbitmq dashboard"
copy:
src: dashboards/rabbitmq.json
dest: /opt/docker-compose/grafana-prometheus/dashboards/rabbitmq.json
owner: '1000'
group: '1000'
mode: '0750'
when: prometheus_rabbitmq_exporter_targets is defined
notify: "grafana-prometheus-restart"

View File

@ -531,3 +531,19 @@ scrape_configs:
replacement: '${1}'
{% endif %}
{% if prometheus_rabbitmq_exporter_targets is defined %}
# Rabbitmq #
- job_name: elasticsearch
scrape_interval: 15s
static_configs:
- targets:
{% for target in prometheus_rabbitmq_exporter_targets %}
- {{ target }}:15692
{% endfor %}
relabel_configs:
- source_labels: [ __address__ ]
target_label: instance
regex: '(.*):15692'
replacement: '${1}'
{% endif %}