Skip to content

Commit 6fe7ba2

Browse files
authored
Add info for disk usage check
1 parent 37c0e46 commit 6fe7ba2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Detect unhealthy containers using two methods:
55
1. **🚪 Opened ports/socks** - uses auto discovery and checks whether services with non zero replicas are available on those ports/socks.
66
2. **📜 Docker events** - analyzes events generated by swarm when containers are created/destroyed 🔁 or have failing healthcheck 💔.
77
3. **👨‍💼 Manager node count** - simply get number of manager nodes and alert when it is lower than expected.
8+
4. **📀 Disk usage** - basic disk usage check on all nodes and all volumes accessible to docker container.
89

910
## Configuration
1011

@@ -46,7 +47,11 @@ When healtcheck fails for given number of retries, it would normally lead to a s
4647
### 👨‍💼Manager node count
4748

4849
When number of ready manager nodes is smaller than `SWARM_MANAGER_MIN`, it would generate an alert. Beware the alert may come from all manager nodes, where the alerter is running - now it is intentional, as the body of the alert might show which node disconnected itself.
49-
50+
51+
### 📀 Disk usage check
52+
53+
Use `DISK_USAGE_MAX` variable to get alert when the usage percentage gets exceeded on any volume accessible over the root / mount.
54+
5055
## Installation
5156

5257
Add an alerter service to some of your stacks and add it to all networks where it should be checking ports:
@@ -64,6 +69,7 @@ services:
6469
mode: global
6570
environment:
6671
ALERT_SCRIPT: /app/integrations/zenduty.sh
72+
DISK_USAGE_MAX: 85
6773
EVENTS_THRESHOLD: 3
6874
EVENTS_WINDOW: 60
6975
LOOP_SLEEP: 10
@@ -72,6 +78,7 @@ services:
7278
ZENDUTY_API_KEY: YOUR_ZENDUTY_API_KEY
7379
volumes:
7480
- /var/run/docker.sock:/var/run/docker.sock
81+
- /:/rootfs:ro # For disk usage check
7582
```
7683

7784
## Integrations

0 commit comments

Comments
 (0)