telegraf inputs

This commit is contained in:
alex 2024-01-20 23:18:19 -05:00
parent f02f006062
commit 0162e528fb
1 changed files with 59 additions and 1 deletions

View File

@ -54,9 +54,67 @@
services.telegraf.enable = true;
services.telegraf.extraConfig = {
outputs.influxdb = {
urls = [ "https://localhost:8086" ];
urls = [ "http://127.0.0.1:8086" ];
database = "telegraf";
};
inputs.net = { };
inputs.netstat = { };
inputs.file = {
files = [ "/sys/class/thermal/thermal_zone0/temp" ];
name_override = "cpu_temperature";
data_format = "value";
data_type = "integer";
};
inputs.exec = {
commands = [ "/opt/vc/bin/vcgencmd measure_temp" ];
name_override = "gpu_temperature";
data_format = "grok";
grok_patterns = [ "%{NUMBER:value:float}" ];
};
inputs.docker = {
endpoint = "unix:///var/run/docker.sock";
gather_services = false;
container_name_include = [ ];
container_name_exclude = [ ];
timeout = "5s";
docker_label_include = [ ];
docker_label_exclude = [ ];
perdevice = true;
total = false;
};
inputs.cpu = {
## Whether to report per-cpu stats or not
percpu = true;
## Whether to report total system cpu stats or not
totalcpu = true;
## Comment this line if you want the raw CPU time metrics
fielddrop = [ "time_*" ];
};
inputs.disk = {
## By default, telegraf gather stats for all mountpoints.
## Setting mountpoints will restrict the stats to the specified mountpoints.
# mount_points = ["/"]
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
## present on /run, /var/run, /dev/shm or /dev).
ignore_fs = [ "tmpfs" "devtmpfs" ];
};
inputs.diskio = {
## By default, telegraf will gather stats for all devices including
## disk partitions.
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"]
## Uncomment the following line if you need disk serial numbers.
# skip_serial_number = false
};
inputs.kernel = { };
inputs.mem = { };
inputs.processes = { };
inputs.swap = { };
inputs.system = { };
inputs.interrupts = { };
inputs.linux_sysctl_fs = { };
};
# Define a user account. Don't forget to set a password with passwd.