2023-09-05 14:41:52 +03:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
2023-09-05 14:58:30 +03:00
|
|
|
pkgs,
|
2023-09-05 14:41:52 +03:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
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;
|
2023-09-05 14:58:30 +03:00
|
|
|
configurationPath = pkgs.concatTextFile {
|
|
|
|
name = "snmp.yml";
|
|
|
|
files = [./snmp.yml];
|
|
|
|
};
|
2023-09-05 14:41:52 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|