shinobu/snmp-exporter: Init
This commit is contained in:
parent
4f536a00d2
commit
0055de1c26
|
@ -135,6 +135,30 @@ in
|
|||
regex = "(.*)\\.vpn\\.sbruder\\.de:9433";
|
||||
};
|
||||
}
|
||||
{
|
||||
job_name = "snmp";
|
||||
metrics_path = "/snmp";
|
||||
params = {
|
||||
module = [ "if_mib" ];
|
||||
};
|
||||
static_configs = mkStaticTargets [
|
||||
"karibik.management.shinonome-lab.de"
|
||||
];
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = lib.singleton "__address__";
|
||||
target_label = "__param_target";
|
||||
}
|
||||
{
|
||||
source_labels = lib.singleton "__param_target";
|
||||
target_label = "instance";
|
||||
}
|
||||
{
|
||||
target_label = "__address__";
|
||||
replacement = "shinobu.vpn.sbruder.de:9116";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
rules =
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
./services/co2_exporter.nix
|
||||
./services/router
|
||||
./services/snmp-exporter.nix
|
||||
];
|
||||
|
||||
sbruder = {
|
||||
|
|
9
machines/shinobu/services/snmp-exporter.nix
Normal file
9
machines/shinobu/services/snmp-exporter.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.prometheus.exporters.snmp = {
|
||||
enable = true;
|
||||
listenAddress = config.sbruder.wireguard.home.address;
|
||||
configurationPath = "${pkgs.prometheus-snmp-exporter.src}/snmp.yml";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue