mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2024-12-23 12:37:30 +01:00
21 lines
730 B
Nix
21 lines
730 B
Nix
{ 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
|
|
};
|
|
wantedBy = [ "multi-user.target" ];
|
|
};
|
|
}
|