summaryrefslogtreecommitdiff
path: root/hosts/vidhar/prometheus/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-11-30 14:02:39 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-11-30 14:02:39 +0100
commit03c515fa55657dafa41a6a0fe7bf806bd7521e87 (patch)
tree8072c7e70c041ca174077564eae75d38e6ac4391 /hosts/vidhar/prometheus/default.nix
parentcb5fb02e309f23c9bb0cfec41a1e6f5d4251a974 (diff)
downloadnixos-03c515fa55657dafa41a6a0fe7bf806bd7521e87.tar
nixos-03c515fa55657dafa41a6a0fe7bf806bd7521e87.tar.gz
nixos-03c515fa55657dafa41a6a0fe7bf806bd7521e87.tar.bz2
nixos-03c515fa55657dafa41a6a0fe7bf806bd7521e87.tar.xz
nixos-03c515fa55657dafa41a6a0fe7bf806bd7521e87.zip
...
Diffstat (limited to 'hosts/vidhar/prometheus/default.nix')
-rw-r--r--hosts/vidhar/prometheus/default.nix10
1 files changed, 9 insertions, 1 deletions
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 {
37 }; 37 };
38 snmp = { 38 snmp = {
39 enable = true; 39 enable = true;
40 configurationPath = ./snmp.yml; 40 configurationPath = pkgs.copyPathToStore "${pkgs.prometheus-snmp-exporter.src}/snmp.yml";
41 }; 41 };
42 unbound = { 42 unbound = {
43 enable = true; 43 enable = true;
@@ -132,6 +132,7 @@ in {
132 ]; 132 ];
133 metrics_path = "/snmp"; 133 metrics_path = "/snmp";
134 params = { 134 params = {
135 auth = ["public_v2"];
135 module = ["if_mib"]; 136 module = ["if_mib"];
136 }; 137 };
137 relabel_configs = [ 138 relabel_configs = [
@@ -145,6 +146,13 @@ in {
145 ]; 146 ];
146 scrape_interval = "15s"; 147 scrape_interval = "15s";
147 } 148 }
149 { job_name = "snmp_exporter";
150 static_configs = [
151 { targets = ["localhost:${toString config.services.prometheus.exporters.snmp.port}"]; }
152 ];
153 relabel_configs = relabelHosts;
154 scrape_interval = "1s";
155 }
148 { job_name = "zte"; 156 { job_name = "zte";
149 static_configs = [ 157 static_configs = [
150 { targets = ["localhost:9900"]; } 158 { targets = ["localhost:9900"]; }