From f5ef819e24c45331636ad28861bce952f25b2fae Mon Sep 17 00:00:00 2001 From: happysalada Date: Tue, 7 Jun 2022 06:53:15 -0400 Subject: mimir: switch pname to mimir --- nixos/modules/services/monitoring/mimir.nix | 2 +- nixos/tests/all-tests.nix | 2 +- nixos/tests/grafana-mimir.nix | 50 ----------------------------- nixos/tests/mimir.nix | 50 +++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 52 deletions(-) delete mode 100644 nixos/tests/grafana-mimir.nix create mode 100644 nixos/tests/mimir.nix (limited to 'nixos') diff --git a/nixos/modules/services/monitoring/mimir.nix b/nixos/modules/services/monitoring/mimir.nix index f85f3ab02c37e..83c0b23c59dd8 100644 --- a/nixos/modules/services/monitoring/mimir.nix +++ b/nixos/modules/services/monitoring/mimir.nix @@ -53,7 +53,7 @@ in { else cfg.configFile; in { - ExecStart = "${pkgs.grafana-mimir}/bin/mimir --config.file=${conf}"; + ExecStart = "${pkgs.mimir}/bin/mimir --config.file=${conf}"; DynamicUser = true; Restart = "always"; ProtectSystem = "full"; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 0f75548ff6fda..1064d62da9304 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -170,7 +170,7 @@ in { frr = handleTest ./frr.nix {}; fsck = handleTest ./fsck.nix {}; ft2-clone = handleTest ./ft2-clone.nix {}; - grafana-mimir = handleTest ./grafana-mimir.nix {}; + mimir = handleTest ./mimir.nix {}; gerrit = handleTest ./gerrit.nix {}; geth = handleTest ./geth.nix {}; ghostunnel = handleTest ./ghostunnel.nix {}; diff --git a/nixos/tests/grafana-mimir.nix b/nixos/tests/grafana-mimir.nix deleted file mode 100644 index 0aafa956f0be2..0000000000000 --- a/nixos/tests/grafana-mimir.nix +++ /dev/null @@ -1,50 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ... }: { - name = "grafana-mimir"; - nodes = { - server = { ... }: { - environment.systemPackages = [ pkgs.jq ]; - services.mimir.enable = true; - services.mimir.configuration = { - ingester.ring.replication_factor = 1; - }; - - services.telegraf.enable = true; - services.telegraf.extraConfig = { - agent.interval = "1s"; - agent.flush_interval = "1s"; - inputs.exec = { - commands = [ - "${pkgs.coreutils}/bin/echo 'foo i=42i'" - ]; - data_format = "influx"; - }; - outputs = { - http = { - # test remote write - url = "http://localhost:8080/api/v1/push"; - - # Data format to output. - data_format = "prometheusremotewrite"; - - headers = { - Content-Type = "application/x-protobuf"; - Content-Encoding = "snappy"; - X-Scope-OrgID = "nixos"; - X-Prometheus-Remote-Write-Version = "0.1.0"; - }; - }; - }; - }; - }; - }; - - testScript = '' - start_all() - server.wait_for_unit("mimir.service") - server.wait_for_unit("telegraf.service") - server.wait_for_open_port(8080) - server.wait_until_succeeds( - "curl -H 'X-Scope-OrgID: nixos' http://127.0.0.1:8080/prometheus/api/v1/label/host/values | jq -r '.data[0]' | grep server" - ) - ''; -}) diff --git a/nixos/tests/mimir.nix b/nixos/tests/mimir.nix new file mode 100644 index 0000000000000..f1b30d261472b --- /dev/null +++ b/nixos/tests/mimir.nix @@ -0,0 +1,50 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "mimir"; + nodes = { + server = { ... }: { + environment.systemPackages = [ pkgs.jq ]; + services.mimir.enable = true; + services.mimir.configuration = { + ingester.ring.replication_factor = 1; + }; + + services.telegraf.enable = true; + services.telegraf.extraConfig = { + agent.interval = "1s"; + agent.flush_interval = "1s"; + inputs.exec = { + commands = [ + "${pkgs.coreutils}/bin/echo 'foo i=42i'" + ]; + data_format = "influx"; + }; + outputs = { + http = { + # test remote write + url = "http://localhost:8080/api/v1/push"; + + # Data format to output. + data_format = "prometheusremotewrite"; + + headers = { + Content-Type = "application/x-protobuf"; + Content-Encoding = "snappy"; + X-Scope-OrgID = "nixos"; + X-Prometheus-Remote-Write-Version = "0.1.0"; + }; + }; + }; + }; + }; + }; + + testScript = '' + start_all() + server.wait_for_unit("mimir.service") + server.wait_for_unit("telegraf.service") + server.wait_for_open_port(8080) + server.wait_until_succeeds( + "curl -H 'X-Scope-OrgID: nixos' http://127.0.0.1:8080/prometheus/api/v1/label/host/values | jq -r '.data[0]' | grep server" + ) + ''; +}) -- cgit 1.4.1