@@ -71,7 +71,7 @@ let
7171 wait_for_open_port(3551)
7272 wait_for_unit("prometheus-apcupsd-exporter.service")
7373 wait_for_open_port(9162)
74− succeed("curl -sSf http://localhost:9162/metrics | grep -q 'apcupsd_info'")
74+ succeed("curl -sSf http://localhost:9162/metrics | grep 'apcupsd_info'")
7575 '';
7676 };
7777
@@ -85,7 +85,7 @@ let
8585 wait_for_unit("prometheus-artifactory-exporter.service")
8686 wait_for_open_port(9531)
8787 succeed(
88− "curl -sSf http://localhost:9531/metrics | grep -q 'artifactory_up'"
88+ "curl -sSf http://localhost:9531/metrics | grep 'artifactory_up'"
8989 )
9090 '';
9191 };
@@ -106,7 +106,7 @@ let
106106 wait_for_unit("prometheus-bind-exporter.service")
107107 wait_for_open_port(9119)
108108 succeed(
109− "curl -sSf http://localhost:9119/metrics | grep -q 'bind_query_recursions_total 0'"
109+ "curl -sSf http://localhost:9119/metrics | grep 'bind_query_recursions_total 0'"
110110 )
111111 '';
112112 };
@@ -135,7 +135,7 @@ let
135135 wait_for_unit("prometheus-bird-exporter.service")
136136 wait_for_open_port(9324)
137137 wait_until_succeeds(
138− "curl -sSf http://localhost:9324/metrics | grep -q 'MyObviousTestString'"
138+ "curl -sSf http://localhost:9324/metrics | grep 'MyObviousTestString'"
139139 )
140140 '';
141141 };
@@ -154,7 +154,7 @@ let
154154 wait_for_unit("prometheus-bitcoin-exporter.service")
155155 wait_for_unit("bitcoind-default.service")
156156 wait_for_open_port(9332)
157− succeed("curl -sSf http://localhost:9332/metrics | grep -q '^bitcoin_blocks '")
157+ succeed("curl -sSf http://localhost:9332/metrics | grep '^bitcoin_blocks '")
158158 '';
159159 };
160160
@@ -172,7 +172,7 @@ let
172172 wait_for_unit("prometheus-blackbox-exporter.service")
173173 wait_for_open_port(9115)
174174 succeed(
175− "curl -sSf 'http://localhost:9115/probe?target=localhost&module=icmp_v6' | grep -q 'probe_success 1'"
175+ "curl -sSf 'http://localhost:9115/probe?target=localhost&module=icmp_v6' | grep 'probe_success 1'"
176176 )
177177 '';
178178 };
@@ -204,7 +204,7 @@ let
204204 "curl -sSfH 'Content-Type: application/json' -X POST --data @/tmp/data.json localhost:9103/collectd"
205205 )
206206 succeed(
207− "curl -sSf localhost:9103/metrics | grep -q 'collectd_testplugin_gauge{instance=\"testhost\"} 23'"
207+ "curl -sSf localhost:9103/metrics | grep 'collectd_testplugin_gauge{instance=\"testhost\"} 23'"
208208 )
209209 '';
210210 };
@@ -220,7 +220,7 @@ let
220220 exporterTest = ''
221221 wait_for_unit("prometheus-dnsmasq-exporter.service")
222222 wait_for_open_port(9153)
223− succeed("curl -sSf http://localhost:9153/metrics | grep -q 'dnsmasq_leases 0'")
223+ succeed("curl -sSf http://localhost:9153/metrics | grep 'dnsmasq_leases 0'")
224224 '';
225225 };
226226
@@ -235,7 +235,7 @@ let
235235 wait_for_unit("prometheus-domain-exporter.service")
236236 wait_for_open_port(9222)
237237 succeed(
238− "curl -sSf 'http://localhost:9222/probe?target=nixos.org' | grep -q 'domain_probe_success 0'"
238+ "curl -sSf 'http://localhost:9222/probe?target=nixos.org' | grep 'domain_probe_success 0'"
239239 )
240240 '';
241241 };
@@ -254,7 +254,7 @@ let
254254 wait_for_unit("prometheus-dovecot-exporter.service")
255255 wait_for_open_port(9166)
256256 succeed(
257− "curl -sSf http://localhost:9166/metrics | grep -q 'dovecot_up{scope=\"global\"} 1'"
257+ "curl -sSf http://localhost:9166/metrics | grep 'dovecot_up{scope=\"global\"} 1'"
258258 )
259259 '';
260260 };
@@ -268,7 +268,7 @@ let
268268 wait_for_unit("prometheus-fritzbox-exporter.service")
269269 wait_for_open_port(9133)
270270 succeed(
271− "curl -sSf http://localhost:9133/metrics | grep -q 'fritzbox_exporter_collect_errors 0'"
271+ "curl -sSf http://localhost:9133/metrics | grep 'fritzbox_exporter_collect_errors 0'"
272272 )
273273 '';
274274 };
@@ -290,9 +290,9 @@ let
290290 wait_for_unit("prometheus-jitsi-exporter.service")
291291 wait_for_open_port(9700)
292292 wait_until_succeeds(
293− 'journalctl -eu prometheus-jitsi-exporter.service -o cat | grep -q "key=participants"'
293+ 'journalctl -eu prometheus-jitsi-exporter.service -o cat | grep "key=participants"'
294294 )
295− succeed("curl -sSf 'localhost:9700/metrics' | grep -q 'jitsi_participants 0'")
295+ succeed("curl -sSf 'localhost:9700/metrics' | grep 'jitsi_participants 0'")
296296 '';
297297 };
298298
@@ -321,7 +321,7 @@ let
321321 wait_for_unit("prometheus-json-exporter.service")
322322 wait_for_open_port(7979)
323323 succeed(
324− "curl -sSf 'localhost:7979/probe?target=http://localhost' | grep -q 'json_test_metric 1'"
324+ "curl -sSf 'localhost:7979/probe?target=http://localhost' | grep 'json_test_metric 1'"
325325 )
326326 '';
327327 };
@@ -426,7 +426,7 @@ let
426426 wait_for_unit("knot.service")
427427 wait_for_unit("prometheus-knot-exporter.service")
428428 wait_for_open_port(9433)
429− succeed("curl -sSf 'localhost:9433' | grep -q 'knot_server_zone_count 1.0'")
429+ succeed("curl -sSf 'localhost:9433' | grep 'knot_server_zone_count 1.0'")
430430 '';
431431 };
432432
@@ -441,10 +441,10 @@ let
441441 wait_for_unit("prometheus-keylight-exporter.service")
442442 wait_for_open_port(9288)
443443 succeed(
444− "curl -sS --write-out '%{http_code}' -o /dev/null http://localhost:9288/metrics | grep -q '400'"
444+ "curl -sS --write-out '%{http_code}' -o /dev/null http://localhost:9288/metrics | grep '400'"
445445 )
446446 succeed(
447− "curl -sS --write-out '%{http_code}' -o /dev/null http://localhost:9288/metrics?target=nosuchdevice | grep -q '500'"
447+ "curl -sS --write-out '%{http_code}' -o /dev/null http://localhost:9288/metrics?target=nosuchdevice | grep '500'"
448448 )
449449 '';
450450 };
@@ -489,7 +489,7 @@ let
489489 wait_for_open_port(10009)
490490 wait_for_unit("prometheus-lnd-exporter.service")
491491 wait_for_open_port(9092)
492− succeed("curl -sSf localhost:9092/metrics | grep -q '^promhttp_metric_handler'")
492+ succeed("curl -sSf localhost:9092/metrics | grep '^promhttp_metric_handler'")
493493 '';
494494 };
495495
@@ -531,7 +531,7 @@ let
531531 wait_for_unit("prometheus-mail-exporter.service")
532532 wait_for_open_port(9225)
533533 wait_until_succeeds(
534− "curl -sSf http://localhost:9225/metrics | grep -q 'mail_deliver_success{configname=\"testserver\"} 1'"
534+ "curl -sSf http://localhost:9225/metrics | grep 'mail_deliver_success{configname=\"testserver\"} 1'"
535535 )
536536 '';
537537 };
@@ -571,7 +571,7 @@ let
571571 wait_for_unit("prometheus-mikrotik-exporter.service")
572572 wait_for_open_port(9436)
573573 succeed(
574− "curl -sSf http://localhost:9436/metrics | grep -q 'mikrotik_scrape_collector_success{device=\"router\"} 0'"
574+ "curl -sSf http://localhost:9436/metrics | grep 'mikrotik_scrape_collector_success{device=\"router\"} 0'"
575575 )
576576 '';
577577 };
@@ -596,7 +596,7 @@ let
596596 wait_for_unit("prometheus-modemmanager-exporter.service")
597597 wait_for_open_port(9539)
598598 succeed(
599− "curl -sSf http://localhost:9539/metrics | grep -q 'modemmanager_info'"
599+ "curl -sSf http://localhost:9539/metrics | grep 'modemmanager_info'"
600600 )
601601 '';
602602 };
@@ -634,7 +634,7 @@ let
634634 wait_for_unit("nginx.service")
635635 wait_for_unit("prometheus-nextcloud-exporter.service")
636636 wait_for_open_port(9205)
637− succeed("curl -sSf http://localhost:9205/metrics | grep -q 'nextcloud_up 1'")
637+ succeed("curl -sSf http://localhost:9205/metrics | grep 'nextcloud_up 1'")
638638 '';
639639 };
640640
@@ -653,7 +653,7 @@ let
653653 wait_for_unit("nginx.service")
654654 wait_for_unit("prometheus-nginx-exporter.service")
655655 wait_for_open_port(9113)
656− succeed("curl -sSf http://localhost:9113/metrics | grep -q 'nginx_up 1'")
656+ succeed("curl -sSf http://localhost:9113/metrics | grep 'nginx_up 1'")
657657 '';
658658 };
659659
@@ -708,12 +708,12 @@ let
708708 succeed("curl http://localhost")
709709 execute("sleep 1")
710710 succeed(
711− "curl -sSf http://localhost:9117/metrics | grep 'filelogger_http_response_count_total' | grep -q 1"
711+ "curl -sSf http://localhost:9117/metrics | grep 'filelogger_http_response_count_total' | grep 1"
712712 )
713713 succeed("curl http://localhost:81")
714714 execute("sleep 1")
715715 succeed(
716− "curl -sSf http://localhost:9117/metrics | grep 'syslogger_http_response_count_total' | grep -q 1"
716+ "curl -sSf http://localhost:9117/metrics | grep 'syslogger_http_response_count_total' | grep 1"
717717 )
718718 '';
719719 };
@@ -726,7 +726,7 @@ let
726726 wait_for_unit("prometheus-node-exporter.service")
727727 wait_for_open_port(9100)
728728 succeed(
729− "curl -sSf http://localhost:9100/metrics | grep -q 'node_exporter_build_info{.\\+} 1'"
729+ "curl -sSf http://localhost:9100/metrics | grep 'node_exporter_build_info{.\\+} 1'"
730730 )
731731 '';
732732 };
@@ -786,7 +786,7 @@ let
786786 wait_for_open_port(389)
787787 wait_for_open_port(9330)
788788 wait_until_succeeds(
789− "curl -sSf http://localhost:9330/metrics | grep -q 'openldap_scrape{result=\"ok\"} 1'"
789+ "curl -sSf http://localhost:9330/metrics | grep 'openldap_scrape{result=\"ok\"} 1'"
790790 )
791791 '';
792792 };
@@ -812,7 +812,7 @@ let
812812 exporterTest = ''
813813 wait_for_unit("openvpn-test.service")
814814 wait_for_unit("prometheus-openvpn-exporter.service")
815− succeed("curl -sSf http://localhost:9176/metrics | grep -q 'openvpn_up{.*} 1'")
815+ succeed("curl -sSf http://localhost:9176/metrics | grep 'openvpn_up{.*} 1'")
816816 '';
817817 };
818818
@@ -828,9 +828,9 @@ let
828828 wait_for_file("/var/lib/postfix/queue/public/showq")
829829 wait_for_open_port(9154)
830830 succeed(
831− "curl -sSf http://localhost:9154/metrics | grep -q 'postfix_smtpd_connects_total 0'"
831+ "curl -sSf http://localhost:9154/metrics | grep 'postfix_smtpd_connects_total 0'"
832832 )
833− succeed("curl -sSf http://localhost:9154/metrics | grep -q 'postfix_up{.*} 1'")
833+ succeed("curl -sSf http://localhost:9154/metrics | grep 'postfix_up{.*} 1'")
834834 '';
835835 };
836836
@@ -847,20 +847,20 @@ let
847847 wait_for_open_port(9187)
848848 wait_for_unit("postgresql.service")
849849 succeed(
850− "curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'"
850+ "curl -sSf http://localhost:9187/metrics | grep 'pg_exporter_last_scrape_error 0'"
851851 )
852− succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'")
852+ succeed("curl -sSf http://localhost:9187/metrics | grep 'pg_up 1'")
853853 systemctl("stop postgresql.service")
854854 succeed(
855− "curl -sSf http://localhost:9187/metrics | grep -qv 'pg_exporter_last_scrape_error 0'"
855+ "curl -sSf http://localhost:9187/metrics | grep -v 'pg_exporter_last_scrape_error 0'"
856856 )
857− succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 0'")
857+ succeed("curl -sSf http://localhost:9187/metrics | grep 'pg_up 0'")
858858 systemctl("start postgresql.service")
859859 wait_for_unit("postgresql.service")
860860 succeed(
861− "curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'"
861+ "curl -sSf http://localhost:9187/metrics | grep 'pg_exporter_last_scrape_error 0'"
862862 )
863− succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'")
863+ succeed("curl -sSf http://localhost:9187/metrics | grep 'pg_up 1'")
864864 '';
865865 };
866866
@@ -893,7 +893,7 @@ let
893893 wait_for_unit("prometheus-py-air-control-exporter.service")
894894 wait_for_open_port(9896)
895895 succeed(
896− "curl -sSf http://localhost:9896/metrics | grep -q 'py_air_control_sampling_error_total'"
896+ "curl -sSf http://localhost:9896/metrics | grep 'py_air_control_sampling_error_total'"
897897 )
898898 '';
899899 };
@@ -908,7 +908,7 @@ let
908908 wait_for_unit("prometheus-redis-exporter.service")
909909 wait_for_open_port(6379)
910910 wait_for_open_port(9121)
911− wait_until_succeeds("curl -sSf localhost:9121/metrics | grep -q 'redis_up 1'")
911+ wait_until_succeeds("curl -sSf localhost:9121/metrics | grep 'redis_up 1'")
912912 '';
913913 };
914914
@@ -926,7 +926,7 @@ let
926926 wait_for_open_port(11334)
927927 wait_for_open_port(7980)
928928 wait_until_succeeds(
929− "curl -sSf 'localhost:7980/probe?target=http://localhost:11334/stat' | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'"
929+ "curl -sSf 'localhost:7980/probe?target=http://localhost:11334/stat' | grep 'rspamd_scanned{host=\"rspamd\"} 0'"
930930 )
931931 '';
932932 };
@@ -957,7 +957,7 @@ let
957957 wait_for_unit("prometheus-rtl_433-exporter.service")
958958 wait_for_open_port(9550)
959959 wait_until_succeeds(
960− "curl -sSf localhost:9550/metrics | grep -q '{}'".format(
960+ "curl -sSf localhost:9550/metrics | grep '{}'".format(
961961 'rtl_433_temperature_celsius{channel="3",id="55",location="",model="zopieux"} 18'
962962 )
963963 )
@@ -973,12 +973,12 @@ let
973973 wait_for_unit("prometheus-smokeping-exporter.service")
974974 wait_for_open_port(9374)
975975 wait_until_succeeds(
976− "curl -sSf localhost:9374/metrics | grep '{}' | grep -qv ' 0$'".format(
976+ "curl -sSf localhost:9374/metrics | grep '{}' | grep -v ' 0$'".format(
977977 'smokeping_requests_total{host="127.0.0.1",ip="127.0.0.1"} '
978978 )
979979 )
980980 wait_until_succeeds(
981− "curl -sSf localhost:9374/metrics | grep -q '{}'".format(
981+ "curl -sSf localhost:9374/metrics | grep '{}'".format(
982982 'smokeping_response_ttl{host="127.0.0.1",ip="127.0.0.1"}'
983983 )
984984 )
@@ -996,7 +996,7 @@ let
996996 exporterTest = ''
997997 wait_for_unit("prometheus-snmp-exporter.service")
998998 wait_for_open_port(9116)
999− succeed("curl -sSf localhost:9116/metrics | grep -q 'snmp_request_errors_total 0'")
999+ succeed("curl -sSf localhost:9116/metrics | grep 'snmp_request_errors_total 0'")
10001000 '';
10011001 };
10021002
@@ -1040,7 +1040,7 @@ let
10401040 exporterTest = ''
10411041 wait_for_unit("prometheus-sql-exporter.service")
10421042 wait_for_open_port(9237)
1043− succeed("curl http://localhost:9237/metrics | grep -c 'sql_points{' | grep -q 2")
1043+ succeed("curl http://localhost:9237/metrics | grep -c 'sql_points{' | grep 2")
10441044 '';
10451045 };
10461046
@@ -1063,7 +1063,7 @@ let
10631063 wait_for_open_port(80)
10641064 wait_for_unit("prometheus-surfboard-exporter.service")
10651065 wait_for_open_port(9239)
1066− succeed("curl -sSf localhost:9239/metrics | grep -q 'surfboard_up 1'")
1066+ succeed("curl -sSf localhost:9239/metrics | grep 'surfboard_up 1'")
10671067 '';
10681068 };
10691069
@@ -1076,7 +1076,7 @@ let
10761076 wait_for_unit("prometheus-systemd-exporter.service")
10771077 wait_for_open_port(9558)
10781078 succeed(
1079− "curl -sSf localhost:9558/metrics | grep -q '{}'".format(
1079+ "curl -sSf localhost:9558/metrics | grep '{}'".format(
10801080 'systemd_unit_state{name="basic.target",state="active",type="target"} 1'
10811081 )
10821082 )
@@ -1098,7 +1098,7 @@ let
10981098 wait_for_open_port(9051)
10991099 wait_for_unit("prometheus-tor-exporter.service")
11001100 wait_for_open_port(9130)
1101− succeed("curl -sSf localhost:9130/metrics | grep -q 'tor_version{.\\+} 1'")
1101+ succeed("curl -sSf localhost:9130/metrics | grep 'tor_version{.\\+} 1'")
11021102 '';
11031103 };
11041104
@@ -1110,7 +1110,7 @@ let
11101110 wait_for_unit("prometheus-unifi-poller-exporter.service")
11111111 wait_for_open_port(9130)
11121112 succeed(
1113− "curl -sSf localhost:9130/metrics | grep -q 'unifipoller_build_info{.\\+} 1'"
1113+ "curl -sSf localhost:9130/metrics | grep 'unifipoller_build_info{.\\+} 1'"
11141114 )
11151115 '';
11161116 };
@@ -1134,7 +1134,7 @@ let
11341134 wait_for_unit("unbound.service")
11351135 wait_for_unit("prometheus-unbound-exporter.service")
11361136 wait_for_open_port(9167)
1137− succeed("curl -sSf localhost:9167/metrics | grep -q 'unbound_up 1'")
1137+ succeed("curl -sSf localhost:9167/metrics | grep 'unbound_up 1'")
11381138 '';
11391139 };
11401140
@@ -1163,7 +1163,7 @@ let
11631163 wait_for_unit("prometheus-varnish-exporter.service")
11641164 wait_for_open_port(6081)
11651165 wait_for_open_port(9131)
1166− succeed("curl -sSf http://localhost:9131/metrics | grep -q 'varnish_up 1'")
1166+ succeed("curl -sSf http://localhost:9131/metrics | grep 'varnish_up 1'")
11671167 '';
11681168 };
11691169