diff --git a/hosts/defiant/services/metrics/default.nix b/hosts/defiant/services/metrics/default.nix index ea816f5..05803d0 100644 --- a/hosts/defiant/services/metrics/default.nix +++ b/hosts/defiant/services/metrics/default.nix @@ -5,6 +5,6 @@ ./prometheus.nix ./grafana.nix ./loki.nix - #./snmp-exporter.nix + ./snmp-exporter.nix ]; } diff --git a/hosts/defiant/services/metrics/prometheus.nix b/hosts/defiant/services/metrics/prometheus.nix index bbdae69..606bb3c 100644 --- a/hosts/defiant/services/metrics/prometheus.nix +++ b/hosts/defiant/services/metrics/prometheus.nix @@ -59,15 +59,6 @@ in { } ]; } - { - job_name = "zfs"; - static_configs = [ - { targets = [ - "voyager.home.feal.no:9134" - "defiant.home.feal.no:9134" - ]; } - ]; - } ]; }; } diff --git a/hosts/defiant/services/metrics/snmp-exporter.nix b/hosts/defiant/services/metrics/snmp-exporter.nix index 174cc75..19beea3 100644 --- a/hosts/defiant/services/metrics/snmp-exporter.nix +++ b/hosts/defiant/services/metrics/snmp-exporter.nix @@ -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" ]; }; diff --git a/hosts/voyager/filesystems.nix b/hosts/voyager/filesystems.nix index c6a035e..fe2dd47 100644 --- a/hosts/voyager/filesystems.nix +++ b/hosts/voyager/filesystems.nix @@ -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 = {