defiant: add uptime-kuma, rename metrics->monitoring

This commit is contained in:
2024-03-10 15:06:33 +01:00
parent 028c3ccbe0
commit 1eed30d7d5
11 changed files with 22 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
{ 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" ];
};
}