0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #177743 from zimbatm/grafana-agent-module

nixos: add grafana-agent module
This commit is contained in:
Jonas Chevalier 2022-06-15 16:22:54 +02:00 committed by GitHub
commit 9c587c51ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 189 additions and 1 deletions

View file

@ -189,6 +189,7 @@ in {
google-oslogin = handleTest ./google-oslogin {};
gotify-server = handleTest ./gotify-server.nix {};
grafana = handleTest ./grafana.nix {};
grafana-agent = handleTest ./grafana-agent.nix {};
graphite = handleTest ./graphite.nix {};
graylog = handleTest ./graylog.nix {};
grocy = handleTest ./grocy.nix {};

View file

@ -0,0 +1,32 @@
import ./make-test-python.nix ({ lib, pkgs, ... }:
let
nodes = {
machine = {
services.grafana-agent = {
enable = true;
};
};
};
in
{
name = "grafana-agent";
meta = with lib.maintainers; {
maintainers = [ zimbatm ];
};
inherit nodes;
testScript = ''
start_all()
with subtest("Grafana-agent is running"):
machine.wait_for_unit("grafana-agent.service")
machine.wait_for_open_port(9090)
machine.succeed(
"curl -sSfN http://127.0.0.1:9090/-/healthy"
)
machine.shutdown()
'';
})