diff options
author | Anthony Roussel <anthony@roussel.dev> | 2023-10-10 00:42:05 +0200 |
---|---|---|
committer | Anthony Roussel <anthony@roussel.dev> | 2023-11-12 11:08:51 +0100 |
commit | 2074409c8652cd176202965a7d38649c8f3f79f4 (patch) | |
tree | c7c8749d6a890a8d97f245283cba017567d5c657 /nixos/tests/prometheus.nix | |
parent | b2c956e071b25a4a4bbd9cf84978a2fdb9525794 (diff) |
nixos/thanos: add query-frontend SystemD service
Diffstat (limited to 'nixos/tests/prometheus.nix')
-rw-r--r-- | nixos/tests/prometheus.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/tests/prometheus.nix b/nixos/tests/prometheus.nix index a075cfc1f1b72..ac987dffd7ce1 100644 --- a/nixos/tests/prometheus.nix +++ b/nixos/tests/prometheus.nix @@ -3,6 +3,7 @@ let queryPort = 9090; minioPort = 9000; pushgwPort = 9091; + frontPort = 9092; s3 = { accessKey = "BKIKJAA5BMMU2RHO6IBB"; @@ -156,6 +157,11 @@ in import ./make-test-python.nix { "prometheus:${toString grpcPort}" ]; }; + services.thanos.query-frontend = { + enable = true; + http-address = "0.0.0.0:${toString frontPort}"; + query-frontend.downstream-url = "http://127.0.0.1:${toString queryPort}"; + }; }; store = { pkgs, ... }: { @@ -262,6 +268,10 @@ in import ./make-test-python.nix { query.wait_for_unit("thanos-query.service") wait_for_metric(query) + # Test Thanos query frontend service + query.wait_for_unit("thanos-query-frontend.service") + query.succeed("curl -sS http://localhost:${toString frontPort}/-/healthy") + # Test if the Thanos sidecar has correctly uploaded its TSDB to S3, if the # Thanos storage service has correctly downloaded it from S3 and if the Thanos # query service running on $store can correctly retrieve the metric: |