1 import ../make-test-python.nix (
6 meta.maintainers = [ pkgs.lib.maintainers.happysalada ];
13 journaldAccess = true;
16 journald.type = "journald";
18 vector_metrics.type = "internal_metrics";
20 vector_logs.type = "internal_logs";
30 path = "/var/lib/vector/logs.log";
36 prometheus_exporter = {
37 type = "prometheus_exporter";
38 inputs = [ "vector_metrics" ];
39 address = "[::]:9598";
46 # ensure vector is forwarding the messages appropriately
48 machine.wait_for_unit("vector.service")
49 machine.wait_for_open_port(9598)
50 machine.wait_until_succeeds("journalctl -o cat -u vector.service | grep 'version=\"${pkgs.vector.version}\"'")
51 machine.wait_until_succeeds("journalctl -o cat -u vector.service | grep 'API is disabled'")
52 machine.wait_until_succeeds("curl -sSf http://localhost:9598/metrics | grep vector_build_info")
53 machine.wait_until_succeeds("curl -sSf http://localhost:9598/metrics | grep vector_component_received_bytes_total | grep journald")
54 machine.wait_until_succeeds("curl -sSf http://localhost:9598/metrics | grep vector_utilization | grep prometheus_exporter")
55 machine.wait_for_file("/var/lib/vector/logs.log")