shinobu/snmp-exporter: Init

This commit is contained in:
Simon Bruder 2023-11-04 13:57:59 +01:00
parent 4f536a00d2
commit 0055de1c26
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 34 additions and 0 deletions

View file

@ -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 =

View file

@ -6,6 +6,7 @@
./services/co2_exporter.nix
./services/router
./services/snmp-exporter.nix
];
sbruder = {

View 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";
};
}