3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests: add prometheus-rspamd-exporter test

This commit is contained in:
WilliButz 2019-09-11 14:03:33 +02:00
parent bcce960d7d
commit ccf00bce12
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2

View file

@ -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;