diff --git a/inventory/group_vars/monitoring_server.yml b/inventory/group_vars/monitoring_server.yml index 386d58a..43298ac 100644 --- a/inventory/group_vars/monitoring_server.yml +++ b/inventory/group_vars/monitoring_server.yml @@ -1,6 +1,9 @@ --- -hosts_to_monitor: +prometheus_prometheus_targets: + - "localhost:9090" + +prometheus_node_exporter_targets: - "localhost:9100" - "10.7.10.96:9100" - "10.7.10.97:9100" diff --git a/playbooks/grafana.yml b/playbooks/grafana.yml index b48f0b0..c896ace 100644 --- a/playbooks/grafana.yml +++ b/playbooks/grafana.yml @@ -16,15 +16,11 @@ - job_name: "prometheus" metrics_path: "/metrics" static_configs: - - targets: - - "localhost:9090" + - targets: "{{ prometheus_prometheus_targets }}" - job_name: "node_exporter" metrics_path: "/metrics" static_configs: - - targets: - - "localhost:9100" - - "10.7.10.96:9100" - - "10.7.10.97:9100" + - targets: "{{ prometheus_node_exporter_targets }}" roles: - role: prometheus.prometheus.prometheus