Testing telegraf
This commit is contained in:
parent
91a2cd25ea
commit
1621a3d0fc
1 changed files with 41 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, hostname, ... }: {
|
||||
# Telegraf Monitoring
|
||||
|
||||
sops.secrets.telegraf-pass = {
|
||||
sops.secrets.telegraf-token = {
|
||||
owner = "telegraf";
|
||||
sopsFile = ../secrets/secrets.yaml;
|
||||
restartUnits = [ "telegraf.service" ];
|
||||
|
@ -16,8 +16,47 @@
|
|||
# Configure the package:
|
||||
services.telegraf = {
|
||||
enable = true;
|
||||
environmentFiles = {
|
||||
/run/secrets/secrets
|
||||
};
|
||||
extraConfig = {
|
||||
|
||||
outputs = {
|
||||
influxdb_v2 = {
|
||||
urls = [ "https://influx.sysctl.io/" ];
|
||||
token = "${TELEGRAF_TOKEN}";
|
||||
organization = "default";
|
||||
bucket = "telegrafdb";
|
||||
http_headers = '{ "Authorization = Token ${TELEGRAF_TOKEN}" }';
|
||||
};
|
||||
};
|
||||
inputs = {
|
||||
cpu = {
|
||||
percpu = true;
|
||||
totalcpu = true;
|
||||
collect_cpu_time = false;
|
||||
report_active = false;
|
||||
};
|
||||
disk = {
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"];
|
||||
};
|
||||
diskio = {};
|
||||
kernel = {};
|
||||
mem = {};
|
||||
processes = {};
|
||||
swap = {};
|
||||
system = {};
|
||||
fail2ban = {};
|
||||
hddtemp = {};
|
||||
intel_powerstat = {};
|
||||
net = {};
|
||||
nvidia_smi = {};
|
||||
sensors = {};
|
||||
smart = {
|
||||
timeout = "30s"
|
||||
};
|
||||
temp = {};
|
||||
wireless = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue