add telegraf
This commit is contained in:
@@ -6,7 +6,7 @@ services:
|
|||||||
container_name: influxdb
|
container_name: influxdb
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8086:8086" # InfluxDB UI and API
|
- "8086:8086"
|
||||||
volumes:
|
volumes:
|
||||||
- influxdb-data:/var/lib/influxdb2
|
- influxdb-data:/var/lib/influxdb2
|
||||||
- influxdb-config:/etc/influxdb2
|
- influxdb-config:/etc/influxdb2
|
||||||
@@ -32,8 +32,19 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- influxdb
|
- 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:
|
volumes:
|
||||||
influxdb-data:
|
influxdb-data:
|
||||||
influxdb-config:
|
influxdb-config:
|
||||||
grafana-data:
|
grafana-data:
|
||||||
|
|
||||||
|
|||||||
33
telegraf/telegraf.conf
Normal file
33
telegraf/telegraf.conf
Normal file
@@ -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]]
|
||||||
Reference in New Issue
Block a user