snmp: from package back to module

This commit is contained in:
2023-09-05 14:41:52 +03:00
parent dae3c590ce
commit 5c1cccb8a4
8 changed files with 24 additions and 27 deletions

View File

@@ -0,0 +1,21 @@
{
config,
lib,
myData,
...
}: {
options.mj.services.snmp_exporter = with lib.types; {
enable = lib.mkEnableOption "Enable prometheus snmp_exporter";
};
config = lib.mkIf config.mj.services.snmp_exporter.enable {
mj.services.friendlyport.vpn.ports = [config.services.prometheus.exporters.snmp.port];
services.prometheus.exporters.snmp = {
enable = true;
listenAddress = "127.0.0.1";
configurationPath = ./snmp.yml;
};
};
}