diff options
author | Luke Granger-Brown <git@lukegb.com> | 2021-06-07 01:59:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 01:59:41 +0100 |
commit | 91fb672b21186518df838c61d2614d765b12f6eb (patch) | |
tree | f71439232ff10d7d4c6e8f8d58a94b2037599d52 /nixos/tests | |
parent | db6597edf4c6148b9c6dd9b34de816a4930ef8de (diff) | |
parent | 3bcf4e31ef70e2d6ec3fd387c174673aa01ef736 (diff) |
Merge pull request #125573 from Flakebi/prometheus-script-exporter
prometheus-script-exporter: init at 1.2.0
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/prometheus-exporters.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 17b71e82ed21d..69a9a6b232181 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -964,6 +964,24 @@ let ''; }; + script = { + exporterConfig = { + enable = true; + settings.scripts = [ + { name = "success"; script = "sleep 1"; } + ]; + }; + exporterTest = '' + wait_for_unit("prometheus-script-exporter.service") + wait_for_open_port(9172) + wait_until_succeeds( + "curl -sSf 'localhost:9172/probe?name=success' | grep -q '{}'".format( + 'script_success{script="success"} 1' + ) + ) + ''; + }; + smokeping = { exporterConfig = { enable = true; |