14 docker compose initial commit

This commit is contained in:
Dominik
2024-05-10 17:53:43 +02:00
commit 277f8544ee
31 changed files with 1124 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# System monitoring using telegraf and influxdb
1. Run the compose `docker-compose up -d`
2. Open [http://localhost:8086](http://localhost:8086) in the browser
3. Create a username and password, name your organization `tgm` and your first bucket `telegraf-bucket`
4. Choose quick start -> add data source -> Telegraf
5. Create a token and paste it in `telegraf/telegraf.conf`
6. Restart stack using `docker-compose up -d`

View File

@@ -0,0 +1,20 @@
name: system-monitoring
services:
# https://www.influxdata.com/
influxdb:
container_name: influxdb
ports:
- 8086:8086
volumes:
- ./influxdb/data:/var/lib/influxdb2
- ./influxdb/config:/etc/influxdb2
restart: unless-stopped
image: influxdb:2.1.1
# https://www.influxdata.com/time-series-platform/telegraf/
telegraf:
container_name: telegraf
image: telegraf:1.25-alpine
depends_on:
- influxdb
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro

View File

@@ -0,0 +1,43 @@
[global_tags]
[agent]
interval = "60s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["http://influxdb:8086"]
token = "FILL_ME_IN_AFTER_CREATING"
organization = "tgm"
bucket = "telegraf-bucket"
[[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]]