feat: grouped server cards with progress bars and sparklines
- Agent sends group name (defaults to hostname) and richer metric notes (memory/disk include absolute GB values; CPU note includes system uptime) - push() accepts group param; server stores it as agent_group on deployments - Upsert key is now (company_id, agent_group, name) so two agents on the same company but different servers don't overwrite each other's CPU/Memory - Add widget config packs: linux-base, web-nginx, database-postgres/redis, docker-host, custom-cmd examples
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Docker host — disk for docker data dir + Docker daemon check.
|
||||
|
||||
widgets:
|
||||
- type: system_disk
|
||||
name: Docker disk
|
||||
path: /var/lib/docker
|
||||
degrade_threshold: 75
|
||||
offline_threshold: 90
|
||||
|
||||
- type: custom_cmd
|
||||
name: Docker daemon
|
||||
cmd: docker info > /dev/null 2>&1 && exit 0 || exit 2
|
||||
|
||||
# Optional: count running containers (degraded if 0, offline if docker is down).
|
||||
# - type: custom_cmd
|
||||
# name: Containers running
|
||||
# cmd: |
|
||||
# COUNT=$(docker ps -q 2>/dev/null | wc -l)
|
||||
# [ $? -ne 0 ] && exit 2
|
||||
# [ "$COUNT" -eq 0 ] && exit 1 || exit 0
|
||||
Reference in New Issue
Block a user