added tailscale and telegraf services

This commit is contained in:
John Lancaster
2024-11-21 19:59:50 +00:00
parent 65e3c65699
commit 91f6a16fb2
3 changed files with 47 additions and 7 deletions

41
telegraf.nix Normal file
View File

@@ -0,0 +1,41 @@
{ ... }:
{
services.telegraf = {
enable = true;
environmentFiles = [ ./telegraf.env ];
extraConfig = {
agent = {
interval = "10s";
round_interval = true;
metric_batch_size = 1000;
metric_buffer_limit = 10000;
collection_jitter = "0s";
flush_interval = "10s";
flush_jitter = "0s";
precision = "";
hostname = "";
omit_hostname = false;
};
inputs = {
docker = {
endpoint = "unix:///var/run/docker.sock";
gather_services = false;
source_tag = false;
container_name_include = [];
timeout = "5s";
perdevice_include = ["cpu" "blkio" "network"];
total = false;
docker_label_include = [];
};
};
outputs = {
influxdb_v2 = {
urls = ["http://panoptes.john-stream.com:8086"];
token = "$INFLUX_WRITE_TOKEN";
organization = "homelab";
bucket = "docker";
};
};
};
};
}