summaryrefslogtreecommitdiffstats
path: root/nixos/tests
diff options
context:
space:
mode:
authorWilliButz <WilliButz@users.noreply.github.com>2021-01-01 16:08:20 +0100
committerGitHub <noreply@github.com>2021-01-01 16:08:20 +0100
commit0587d518db1b4c88eab4c09c902317a4dd9b2a7f (patch)
tree4cd1f2cefb16a76ac8fcfe5628ddd66161467e56 /nixos/tests
parent15c7a0eb18235ea563fcc3a6882d428496bdb4a8 (diff)
parent3297ac72f15d9df5650e2532782bc81e31b7178c (diff)
Merge pull request #107891 from lukegb/smokeping-prober
prometheus-smokeping-prober: init at 0.3.1 from git
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/prometheus-exporters.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 938607e0b7bf..f611d961769a 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -695,6 +695,27 @@ let
'';
};
+ smokeping = {
+ exporterConfig = {
+ enable = true;
+ hosts = ["127.0.0.1"];
+ };
+ exporterTest = ''
+ wait_for_unit("prometheus-smokeping-exporter.service")
+ wait_for_open_port(9374)
+ wait_until_succeeds(
+ "curl -sSf localhost:9374/metrics | grep '{}' | grep -qv ' 0$'".format(
+ 'smokeping_requests_total{host="127.0.0.1",ip="127.0.0.1"} '
+ )
+ )
+ wait_until_succeeds(
+ "curl -sSf localhost:9374/metrics | grep -q '{}'".format(
+ 'smokeping_response_ttl{host="127.0.0.1",ip="127.0.0.1"}'
+ )
+ )
+ '';
+ };
+
snmp = {
exporterConfig = {
enable = true;