nixos-config/hosts/defiant/services/metrics/snmp-exporter.nix

21 lines
527 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='/var/prometheus/snmp.yml'";
# TODO: Fix this conf file!
};
wantedBy = [ "multi-user.target" ];
};
}