mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 22:20:30 +03:00
27 lines
659 B
Nix
27 lines
659 B
Nix
![]() |
{ lib, ... }:
|
||
|
{
|
||
|
name = "victorialogs";
|
||
|
meta.maintainers = with lib.maintainers; [ marie ];
|
||
|
|
||
|
nodes.machine =
|
||
|
{ pkgs, ... }:
|
||
|
{
|
||
|
services.victorialogs.enable = true;
|
||
|
|
||
|
services.journald.upload = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
Upload.URL = "http://localhost:9428/insert/journald";
|
||
|
};
|
||
|
};
|
||
|
environment.systemPackages = [ pkgs.curl ];
|
||
|
};
|
||
|
|
||
|
testScript = ''
|
||
|
machine.wait_for_unit("victorialogs.service")
|
||
|
|
||
|
machine.succeed("echo 'meow' | systemd-cat -p info")
|
||
|
machine.wait_until_succeeds("curl --fail http://localhost:9428/select/logsql/query -d 'query=\"meow\"' | grep meow")
|
||
|
'';
|
||
|
}
|