1 import ./make-test-python.nix ({ lib, pkgs, ... }: {
5 services.prometheus.alertmanager = {
12 resolve_timeout = "1m";
21 repeat_interval = "24h";
28 url = "http://localhost:1234";
48 name = "alertmanager";
49 uri = "https://127.0.0.1:9093";
53 karma.name = "test-dashboard";
65 with subtest("Wait for server to come up"):
67 server.wait_for_unit("alertmanager.service")
68 server.wait_for_unit("karma.service")
70 server.sleep(5) # wait for both services to settle
72 server.wait_for_open_port(9093)
73 server.wait_for_open_port(8081)
75 with subtest("Test alertmanager readiness"):
76 server.succeed("curl -s http://127.0.0.1:9093/-/ready")
78 # Karma only starts serving the dashboard once it has established connectivity to all alertmanagers in its config
79 # Therefore, this will fail if karma isn't able to reach alertmanager
80 server.succeed("curl -s http://127.0.0.1:8081")