2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-23 20:47:29 +01:00
nixos-config/hosts/defiant/services/metrics/snmp-exporter.nix

21 lines
730 B
Nix
Raw Normal View History

2023-04-15 20:44:47 +02:00
{ config, pkgs, ... }:
{
environment.systemPackages = [
pkgs.prometheus-snmp-exporter
];
systemd.services.prometheus-snmp-exporter = {
enable = true;
description = "Gather data from SNMP devices and expose them as Prometheus metrics";
unitConfig = {
Type = "simple";
};
serviceConfig = {
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
2023-04-15 20:44:47 +02:00
};
wantedBy = [ "multi-user.target" ];
};
}