telegraf config part 1

This commit is contained in:
2023-01-26 18:12:54 +01:00
parent 90a505787e
commit 442998c249
8 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
[[inputs.apache]]
urls = ["http://localhost/server-status?auto"]

View File

@@ -0,0 +1,17 @@
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.swap]]
[[inputs.system]]
[[inputs.internal]]
collect_memstats = true
[[inputs.net]]
[[inputs.netstat]]

View File

@@ -0,0 +1,14 @@
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
gather_services = true
container_names = []
source_tag = false
container_name_include = []
container_name_exclude = []
timeout = "5s"
perdevice = false
perdevice_include = ["cpu", "blkio", "network"]
total = false
total_include = ["cpu", "blkio", "network"]
docker_label_include = []
docker_label_exclude = []

View File

@@ -0,0 +1,4 @@
[[inputs.dovecot]]
servers = ["localhost:24242"]
type = "global"
filters = [""]

View File

@@ -0,0 +1,4 @@
[[inputs.bind]]
urls = ["http://localhost:8053/json/v1"]
gather_memory_contexts = false
gather_views = false

View File

@@ -0,0 +1,4 @@
[[outputs.influxdb]]
urls = ["http://grafana:8086"]
database = "linux"
skip_database_creation = false

View File

@@ -1,4 +1,9 @@
- name: restart_snmpd - name: restart_snmpd
service: service:
name: "snmpd" name: "snmpd"
state: restarted
- name: restart_telegraf
service:
name: "telegraf"
state: restarted state: restarted

View File

@@ -20,3 +20,13 @@
state: latest state: latest
update_cache: yes update_cache: yes
- name: server | telegraf | copy basic config
copy:
dest: "/etc/telegraf/telegraf.d/{{ item }}"
src: "{{ item }}"
loop:
- input_basics.conf
- output_influx.conf
notify: restart telegraf