From 03c515fa55657dafa41a6a0fe7bf806bd7521e87 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 30 Nov 2025 14:02:39 +0100 Subject: ... --- hosts/vidhar/prometheus/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'hosts/vidhar/prometheus/default.nix') diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index 4589c1ea..c0c74f16 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix @@ -37,7 +37,7 @@ in { }; snmp = { enable = true; - configurationPath = ./snmp.yml; + configurationPath = pkgs.copyPathToStore "${pkgs.prometheus-snmp-exporter.src}/snmp.yml"; }; unbound = { enable = true; @@ -132,6 +132,7 @@ in { ]; metrics_path = "/snmp"; params = { + auth = ["public_v2"]; module = ["if_mib"]; }; relabel_configs = [ @@ -145,6 +146,13 @@ in { ]; scrape_interval = "15s"; } + { job_name = "snmp_exporter"; + static_configs = [ + { targets = ["localhost:${toString config.services.prometheus.exporters.snmp.port}"]; } + ]; + relabel_configs = relabelHosts; + scrape_interval = "1s"; + } { job_name = "zte"; static_configs = [ { targets = ["localhost:9900"]; } -- cgit v1.2.3