about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorpennae <82953136+pennae@users.noreply.github.com>2022-03-09 16:12:32 +0000
committerGitHub <noreply@github.com>2022-03-09 16:12:32 +0000
commit06c57317c20943e7936d953cb10764d19c4124ff (patch)
tree91e4d67892d6ef414d1d72cc5414e78f6888de69 /nixos/tests
parent12d3b345c960458f62b77134b2ca1da5268277c9 (diff)
parentf1bcb88bf6b075856570c433014ed123d53abdc0 (diff)
downloadnixlib-06c57317c20943e7936d953cb10764d19c4124ff.tar
nixlib-06c57317c20943e7936d953cb10764d19c4124ff.tar.gz
nixlib-06c57317c20943e7936d953cb10764d19c4124ff.tar.bz2
nixlib-06c57317c20943e7936d953cb10764d19c4124ff.tar.lz
nixlib-06c57317c20943e7936d953cb10764d19c4124ff.tar.xz
nixlib-06c57317c20943e7936d953cb10764d19c4124ff.tar.zst
nixlib-06c57317c20943e7936d953cb10764d19c4124ff.zip
Merge pull request #146653 from DarkDNA/nixos/fix-systemd-exporter/extraFlags
nixos/prometheus/systemd: Implement the extraFlags config option.
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/prometheus-exporters.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 323d79c5b86f..18b64a958dd6 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -1156,6 +1156,10 @@ let
     systemd = {
       exporterConfig = {
         enable = true;
+
+        extraFlags = [
+          "--collector.enable-restart-count"
+        ];
       };
       metricProvider = { };
       exporterTest = ''
@@ -1166,6 +1170,11 @@ let
                 'systemd_unit_state{name="basic.target",state="active",type="target"} 1'
             )
         )
+        succeed(
+            "curl -sSf localhost:9558/metrics | grep '{}'".format(
+                'systemd_service_restart_total{state="prometheus-systemd-exporter.service"} 0'
+            )
+        )
       '';
     };