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:
commit
9c587c51ac
5 changed files with 189 additions and 1 deletions
|
@ -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 {};
|
||||
|
|
32
nixos/tests/grafana-agent.nix
Normal file
32
nixos/tests/grafana-agent.nix
Normal 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()
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue