diff --git a/Zabbix.md b/Zabbix.md index b43a715..da9130b 100644 --- a/Zabbix.md +++ b/Zabbix.md @@ -1,6 +1,6 @@ # Zabbix -Monitoring stack — Zabbix 7.4 with PostgreSQL backend, Apache web frontend, and active agent. +Monitoring stack — Zabbix 7.4 with PostgreSQL backend, Apache web frontend, and two agents. ## Stack @@ -8,13 +8,25 @@ Monitoring stack — Zabbix 7.4 with PostgreSQL backend, Apache web frontend, an |-----------|-------| | Zabbix Server | `zabbix/zabbix-server-pgsql:ubuntu-7.4-latest` | | Web Frontend | `zabbix/zabbix-web-apache-pgsql:ubuntu-7.4-latest` | -| Agent (active) | `zabbix/zabbix-agent:ubuntu-7.4-latest` | +| Agent (container) | `zabbix/zabbix-agent:ubuntu-7.4-latest` | | Database | `postgres:16-alpine` | ## Access - URL: https://zb.alogins.net (Caddy → localhost:81) -- Default credentials: `Admin` / `zabbix` + +## Agents + +Two agents are configured: + +| Agent | Type | Hostname | Monitors | +|-------|------|----------|----------| +| `zabbix-agent2` | systemd on host | `AgapHost` | Docker host (physical server) | +| `zabbix-agent` container | Docker Compose | `Zabbix server` | Zabbix server container | + +The host agent (`zabbix-agent2`) connects to `127.0.0.1:10051` (Zabbix server exposed port). + +The container agent connects to `zabbix-server` over the internal `backend` Docker network. The "Zabbix server" host in Zabbix uses interface DNS `zabbix-agent` for passive checks. ## Config @@ -26,7 +38,7 @@ Directory: `agap_git/zabbix/` |----------|-------------| | `WEB_PORT` | Host port for web frontend (81) | | `PHP_TZ` | Timezone for PHP/web | -| `AGENT_HOSTNAME` | Hostname reported by agent | +| `AGENT_HOSTNAME` | Hostname for Docker container agent (`Zabbix server`) | | `POSTGRES_DATA_DIR` | PostgreSQL data path (`/mnt/ssd/dbs/zabbix`) | | `POSTGRES_USER` | DB username | | `POSTGRES_PASSWORD` | DB password | @@ -41,6 +53,6 @@ docker compose up -d ## Notes -- Agent runs in active mode only (`ZBX_PASSIVE_ALLOW=false`) -- Zabbix server port 10051 is exposed on host for external agents -- Database network is internal (not exposed) +- Zabbix server port 10051 is exposed on the host for the host agent +- Backend and database networks are internal (not exposed) +- Container agent uses both active and passive check modes