hosts/darwin02: add telegraf

This commit is contained in:
zowoq 2023-06-08 08:17:52 +10:00
parent 10c0ca8dca
commit 91352a4c01
2 changed files with 23 additions and 1 deletions

View file

@ -7,7 +7,7 @@ in
# https://docs.hercules-ci.com/hercules-ci/getting-started/deploy/nix-darwin
services.hercules-ci-agent.enable = true;
imports = [ ./builder.nix ];
imports = [ ./builder.nix ./telegraf.nix ];
services.nix-daemon.enable = true;

View file

@ -0,0 +1,22 @@
{
services.telegraf = {
enable = true;
extraConfig = {
agent.interval = "60s";
inputs = {
prometheus.metric_version = 2;
system = { };
mem = { };
disk.tagdrop = {
fstype = [ "tmpfs" "ramfs" "devtmpfs" "devfs" "iso9660" "overlay" "aufs" "squashfs" ];
device = [ "rpc_pipefs" "lxcfs" "nsfs" "borgfs" ];
};
diskio = { };
};
outputs.prometheus_client = {
listen = ":9273";
metric_version = 2;
};
};
};
}