summaryrefslogtreecommitdiffstats
path: root/nixos/tests
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-01-03 19:28:12 +0100
committerGitHub <noreply@github.com>2021-01-03 19:28:12 +0100
commit3b57908018dfb72fbacd60b25d5fd326f02087d5 (patch)
tree00565fbe61e4afc67165f56969622acd6f42976f /nixos/tests
parenta6e50716bd5db56903b2b1044be308e12d466e53 (diff)
parent6e43cc7fb0f22a88a989583ccf50e56f7f72ad6a (diff)
Merge pull request #108179 from WilliButz/update/prometheus-json-exporter/0.2.0
prometheus-json-exporter: unstable-2017-10-06 -> 0.2.0
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/prometheus-exporters.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index f611d961769a..8fcb0a7aa2c3 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -222,10 +222,11 @@ let
exporterConfig = {
enable = true;
url = "http://localhost";
- configFile = pkgs.writeText "json-exporter-conf.json" (builtins.toJSON [{
- name = "json_test_metric";
- path = "$.test";
- }]);
+ configFile = pkgs.writeText "json-exporter-conf.json" (builtins.toJSON {
+ metrics = [
+ { name = "json_test_metric"; path = "$.test"; }
+ ];
+ });
};
metricProvider = {
systemd.services.prometheus-json-exporter.after = [ "nginx.service" ];
@@ -241,7 +242,9 @@ let
wait_for_open_port(80)
wait_for_unit("prometheus-json-exporter.service")
wait_for_open_port(7979)
- succeed("curl -sSf localhost:7979/metrics | grep -q 'json_test_metric 1'")
+ succeed(
+ "curl -sSf 'localhost:7979/probe?target=http://localhost' | grep -q 'json_test_metric 1'"
+ )
'';
};
@@ -659,7 +662,7 @@ let
wait_for_open_port(11334)
wait_for_open_port(7980)
wait_until_succeeds(
- "curl -sSf localhost:7980/metrics | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'"
+ "curl -sSf 'localhost:7980/probe?target=http://localhost:11334/stat' | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'"
)
'';
};