From 9864604f662572397a8c22e5a6d0c722edc9f08d Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Wed, 26 May 2021 17:11:20 +0200 Subject: [PATCH] mysqld instead of mysql --- tasks/main.yml | 2 +- templates/prometheus.yml.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 1b4139c..6a0265d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -21,7 +21,7 @@ - name: 'prometheus | MySQL exporter' include_tasks: 'mysqld_exporter.yml' when: - - "'mysql' in prometheus_exporter_packages" + - "'mysqld' in prometheus_exporter_packages" - name: 'prometheus | PostgreSQL exporter' include_tasks: 'postgresql_exporter.yml' diff --git a/templates/prometheus.yml.j2 b/templates/prometheus.yml.j2 index c9ce652..8d326b1 100644 --- a/templates/prometheus.yml.j2 +++ b/templates/prometheus.yml.j2 @@ -44,13 +44,13 @@ scrape_configs: {% endif %} {% endif %} -{% if 'mysql' in prometheus_exporter_packages %} +{% if 'mysqld' in prometheus_exporter_packages %} - job_name: mysql scrape_interval: 30s scrape_timeout: 10s static_configs: - targets: -{% if prometheus_mysql_exporter_targets is defined %} +{% if prometheus_mysqld_exporter_targets is defined %} {% for target in prometheus_mysqld_exporter_targets %} - {{ target }}:9104 {% endfor %}