aboutsummaryrefslogtreecommitdiff
path: root/nixos/tests
diff options
context:
space:
mode:
authorWilliButz <wbutz@cyberfnord.de>2019-09-11 14:03:33 +0200
committerWilliButz <wbutz@cyberfnord.de>2019-09-11 14:21:36 +0200
commitccf00bce125d54ebc6d79b7e9b97ef3952620e1f (patch)
tree22906c6ed4b4c2d5810c095334378748cf863366 /nixos/tests
parentbcce960d7d042503ec8cad1b5544dd9d55a8ec63 (diff)
nixos/tests: add prometheus-rspamd-exporter test
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/prometheus-exporters.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 02d83f82f33..9826b56b74d 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -297,6 +297,22 @@ let
'';
};
+ rspamd = {
+ exporterConfig = {
+ enable = true;
+ };
+ metricProvider = {
+ services.rspamd.enable = true;
+ };
+ exporterTest = ''
+ waitForUnit("rspamd.service");
+ waitForUnit("prometheus-rspamd-exporter.service");
+ waitForOpenPort(11334);
+ waitForOpenPort(7980);
+ waitUntilSucceeds("curl -sSf localhost:7980/metrics | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'");
+ '';
+ };
+
snmp = {
exporterConfig = {
enable = true;