Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.7 KiB
Nix
57 lines
1.7 KiB
Nix
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
name = "vector-test1";
|
|
meta.maintainers = [ pkgs.lib.maintainers.happysalada ];
|
|
|
|
nodes.machine =
|
|
{ config, pkgs, ... }:
|
|
{
|
|
services.vector = {
|
|
enable = true;
|
|
journaldAccess = true;
|
|
settings = {
|
|
sources = {
|
|
journald.type = "journald";
|
|
|
|
vector_metrics.type = "internal_metrics";
|
|
|
|
vector_logs.type = "internal_logs";
|
|
};
|
|
|
|
sinks = {
|
|
file = {
|
|
type = "file";
|
|
inputs = [
|
|
"journald"
|
|
"vector_logs"
|
|
];
|
|
path = "/var/lib/vector/logs.log";
|
|
encoding = {
|
|
codec = "json";
|
|
};
|
|
};
|
|
|
|
prometheus_exporter = {
|
|
type = "prometheus_exporter";
|
|
inputs = [ "vector_metrics" ];
|
|
address = "[::]:9598";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# ensure vector is forwarding the messages appropriately
|
|
testScript = ''
|
|
machine.wait_for_unit("vector.service")
|
|
machine.wait_for_open_port(9598)
|
|
machine.wait_until_succeeds("journalctl -o cat -u vector.service | grep 'version=\"${pkgs.vector.version}\"'")
|
|
machine.wait_until_succeeds("journalctl -o cat -u vector.service | grep 'API is disabled'")
|
|
machine.wait_until_succeeds("curl -sSf http://localhost:9598/metrics | grep vector_build_info")
|
|
machine.wait_until_succeeds("curl -sSf http://localhost:9598/metrics | grep vector_component_received_bytes_total | grep journald")
|
|
machine.wait_until_succeeds("curl -sSf http://localhost:9598/metrics | grep vector_utilization | grep prometheus_exporter")
|
|
machine.wait_for_file("/var/lib/vector/logs.log")
|
|
'';
|
|
}
|