From e5d1adeded629d6f380a4198c6572349c9254bbb Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Thu, 25 Apr 2024 09:22:30 +0200 Subject: [PATCH] pve to proxmox --- docs/variables.md | 3 +++ templates/conf/prometheus.yml.j2 | 4 ++-- templates/conf/vmagent.yml.j2 | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/variables.md b/docs/variables.md index f5886e4..2a0cd3d 100644 --- a/docs/variables.md +++ b/docs/variables.md @@ -62,6 +62,9 @@ | prometheus_postgres_exporter_user | The user for Postgres exporter | String | "postgres" | | prometheus_postgres_exporter_password | The password for Postgres exporter | String | "changeme_" | | prometheus_postgres_exporter_port | The port for Postgres exporter | Integer | 5432 | +| prometheus_proxmox_exporter_user | Username used to contact Proxmox API | String | "" | +| prometheus_proxmox_exporter_password | Password for previous username | String | "" | +| prometheus_proxmox_exporter_node | Proxmox node to metrics from | String | "" | | prometheus_redis_exporter_addr | The address for Redis exporter | String | "redis://localhost:6379" | | prometheus_redis_exporter_user | The user for Redis exporter | String | "" | | prometheus_redis_exporter_password | The password for Redis exporter | String | "" | diff --git a/templates/conf/prometheus.yml.j2 b/templates/conf/prometheus.yml.j2 index ad28ecd..27d9af2 100644 --- a/templates/conf/prometheus.yml.j2 +++ b/templates/conf/prometheus.yml.j2 @@ -414,13 +414,13 @@ scrape_configs: replacement: '${1}' {% endif %} -{% if prometheus_pve_exporter_targets is defined %} +{% if prometheus_proxmox_exporter_targets is defined %} # proxmox # - job_name: pve scrape_interval: 30s static_configs: - targets: -{% for target in prometheus_pve_exporter_targets %} +{% for target in prometheus_proxmox_exporter_targets %} - {{ target }}:9221 {% endfor %} metrics_path: /pve diff --git a/templates/conf/vmagent.yml.j2 b/templates/conf/vmagent.yml.j2 index 9d69129..2f51efb 100644 --- a/templates/conf/vmagent.yml.j2 +++ b/templates/conf/vmagent.yml.j2 @@ -408,13 +408,13 @@ scrape_configs: replacement: '${1}' {% endif %} -{% if prometheus_pve_exporter_targets is defined %} +{% if prometheus_proxmox_exporter_targets is defined %} # proxmox # - job_name: pve scrape_interval: 30s static_configs: - targets: -{% for target in prometheus_pve_exporter_targets %} +{% for target in prometheus_proxmox_exporter_targets %} - {{ target }}:9221 {% endfor %} metrics_path: /pve