summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/aliases.nix2
-rw-r--r--modules/monitoring.nix11
2 files changed, 12 insertions, 1 deletions
diff --git a/data/aliases.nix b/data/aliases.nix
index e41bac5..a13fc42 100644
--- a/data/aliases.nix
+++ b/data/aliases.nix
@@ -57,6 +57,6 @@ rec {
port = 11115;
};
hledger-web = { port = 11116; };
- prometheus-pms7003-exporter = { port = 11117; };
+ prometheus-pms7003-exporter = { host = "172.20.100.10"; port = 11117; };
};
}
diff --git a/modules/monitoring.nix b/modules/monitoring.nix
index a4ead4b..65e292d 100644
--- a/modules/monitoring.nix
+++ b/modules/monitoring.nix
@@ -31,6 +31,11 @@ in
type = lib.types.int;
default = aliases.services.prometheus-snmp-exporter.port;
};
+ prometheus-pms7003-exporter = lib.mkOption {
+ type = lib.types.str;
+ default = with aliases.services.prometheus-pms7003-exporter;
+ "${host}:${toString port}";
+ };
snmp-targets = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ aliases.ip.ap2 ];
@@ -80,6 +85,12 @@ in
];
}
{
+ job_name = "pms7003";
+ static_configs = [
+ { targets = ["${cfg.prometheus-pms7003-exporter}"]; }
+ ];
+ }
+ {
job_name = "snmp";
metrics_path = "/snmp";
params = { module = [ "cisco_if_mib" ]; };