mirror of
https://github.com/dominikhoebert/docker-projects.git
synced 2025-10-11 00:56:17 +00:00
14 docker compose initial commit
This commit is contained in:
8
system-monitoring/README.md
Normal file
8
system-monitoring/README.md
Normal 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`
|
20
system-monitoring/docker-compose.yaml
Normal file
20
system-monitoring/docker-compose.yaml
Normal 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
|
43
system-monitoring/telegraf/telegraf.conf
Normal file
43
system-monitoring/telegraf/telegraf.conf
Normal 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]]
|
Reference in New Issue
Block a user