defiant/metrics: Remove zfs exporter, fix snmp exporter
This commit is contained in:
parent
6f0c449648
commit
187e61a942
|
@ -5,6 +5,6 @@
|
|||
./prometheus.nix
|
||||
./grafana.nix
|
||||
./loki.nix
|
||||
#./snmp-exporter.nix
|
||||
./snmp-exporter.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -59,15 +59,6 @@ in {
|
|||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "zfs";
|
||||
static_configs = [
|
||||
{ targets = [
|
||||
"voyager.home.feal.no:9134"
|
||||
"defiant.home.feal.no:9134"
|
||||
]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
Type = "simple";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter --config.file='/var/prometheus/snmp.yml'";
|
||||
# TODO: Fix this conf file!
|
||||
ExecStart = "${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter --config.file='/tank/services/metrics/prometheus/snmp.yml'";
|
||||
# snmp.yml = https://github.com/prometheus/snmp_exporter/blob/main/snmp.yml + https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_DiskStation_MIB_Guide.pdf
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
|
|
@ -11,19 +11,6 @@
|
|||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
};
|
||||
services.zfs.autoScrub.enable = true;
|
||||
services.prometheus.exporters.zfs = {
|
||||
enable = true;
|
||||
# "ip46" is cursed, do it manually below
|
||||
# openFirewall = true;
|
||||
# firewallFilter = "-p tcp -m tcp --source 192.168.10.175/32 --dport 9134";
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 9134 ];
|
||||
extraCommands = ''
|
||||
iptables -A INPUT -p tcp -m tcp --source 192.168.10.175/32 --dport 9134 -j ACCEPT
|
||||
iptables -A INPUT -p tcp -m tcp --dport 9134 -j DROP
|
||||
'';
|
||||
};
|
||||
|
||||
# Network mounts (import)
|
||||
fileSystems = {
|
||||
|
|
Loading…
Reference in New Issue