add telegraf
parent
e0a00e91fb
commit
82cc5a8475
|
@ -6,7 +6,7 @@ services:
|
|||
container_name: influxdb
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8086:8086" # InfluxDB UI and API
|
||||
- "8086:8086"
|
||||
volumes:
|
||||
- influxdb-data:/var/lib/influxdb2
|
||||
- influxdb-config:/etc/influxdb2
|
||||
|
@ -32,8 +32,19 @@ services:
|
|||
depends_on:
|
||||
- influxdb
|
||||
|
||||
telegraf:
|
||||
image: telegraf:1.30
|
||||
container_name: telegraf
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /:/host:ro
|
||||
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
||||
depends_on:
|
||||
- influxdb
|
||||
|
||||
volumes:
|
||||
influxdb-data:
|
||||
influxdb-config:
|
||||
grafana-data:
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
[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
|
||||
|
||||
[[outputs.influxdb_v2]]
|
||||
urls = ["http://influxdb:8086"]
|
||||
token = "my-secret-token"
|
||||
organization = "my-org"
|
||||
bucket = "telegraf-bucket"
|
||||
|
||||
[[inputs.cpu]]
|
||||
percpu = true
|
||||
totalcpu = true
|
||||
collect_cpu_time = false
|
||||
report_active = true
|
||||
|
||||
[[inputs.mem]]
|
||||
[[inputs.disk]]
|
||||
[[inputs.system]]
|
||||
[[inputs.net]]
|
||||
[[inputs.processes]]
|
||||
[[inputs.swap]]
|
||||
|
||||
[[inputs.diskio]]
|
||||
[[inputs.kernel]]
|
Loading…
Reference in New Issue