Update Zabbix: document two-agent setup, fix outdated notes

2026-02-22 10:56:33 +00:00
parent 7d1fb779f4
commit e318c3e90b

@@ -1,6 +1,6 @@
# Zabbix # 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 ## 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` | | Zabbix Server | `zabbix/zabbix-server-pgsql:ubuntu-7.4-latest` |
| Web Frontend | `zabbix/zabbix-web-apache-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` | | Database | `postgres:16-alpine` |
## Access ## Access
- URL: https://zb.alogins.net (Caddy → localhost:81) - 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 ## Config
@@ -26,7 +38,7 @@ Directory: `agap_git/zabbix/`
|----------|-------------| |----------|-------------|
| `WEB_PORT` | Host port for web frontend (81) | | `WEB_PORT` | Host port for web frontend (81) |
| `PHP_TZ` | Timezone for PHP/web | | `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_DATA_DIR` | PostgreSQL data path (`/mnt/ssd/dbs/zabbix`) |
| `POSTGRES_USER` | DB username | | `POSTGRES_USER` | DB username |
| `POSTGRES_PASSWORD` | DB password | | `POSTGRES_PASSWORD` | DB password |
@@ -41,6 +53,6 @@ docker compose up -d
## Notes ## Notes
- Agent runs in active mode only (`ZBX_PASSIVE_ALLOW=false`) - Zabbix server port 10051 is exposed on the host for the host agent
- Zabbix server port 10051 is exposed on host for external agents - Backend and database networks are internal (not exposed)
- Database network is internal (not exposed) - Container agent uses both active and passive check modes