From a8ea9fe49250d2d8e3d41a10a0f21e326c87fbad Mon Sep 17 00:00:00 2001 From: WilliButz Date: Fri, 12 Jan 2024 18:40:31 +0100 Subject: [PATCH] nixos/prometheus-snmp-exporter: switch to new config syntax Introduced with version 0.23.0, see https://github.com/prometheus/snmp_exporter/blob/b75fc6b839ee3f3ccbee68bee55f1ae99555084a/auth-split-migration.md --- .../services/monitoring/prometheus/exporters/snmp.nix | 8 +++----- nixos/tests/prometheus-exporters.nix | 8 +++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix index edc6e4b5022a..ad4723d28405 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix @@ -24,11 +24,9 @@ in Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option. ''; example = { - "default" = { - "version" = 2; - "auth" = { - "community" = "public"; - }; + auths.public_v2 = { + community = "public"; + version = 2; }; }; }; diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 53e6626c0e32..5872b02b609e 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1392,9 +1392,11 @@ let snmp = { exporterConfig = { enable = true; - configuration.default = { - version = 2; - auth.community = "public"; + configuration = { + auths.public_v2 = { + community = "public"; + version = 2; + }; }; }; exporterTest = ''