Fix zabbix agent hostnames for correct host assignment

- Container agent: rename from AgapHost to 'Zabbix server' so it monitors
  the Zabbix server container (was conflicting with the host agent)
- Enable passive listeners in container agent (remove ZBX_STARTAGENTS=0)
- Update 'Zabbix server' host interface from 127.0.0.1 to DNS zabbix-agent
  so the server can reach the agent over the backend Docker network

Host zabbix-agent2 (systemd) keeps hostname AgapHost for host monitoring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alvis
2026-02-22 10:51:35 +00:00
parent 7548ba117f
commit 90cb41ec53
2 changed files with 1 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ WEB_PORT=81
PHP_TZ=Europe/Amsterdam PHP_TZ=Europe/Amsterdam
# Agent # Agent
AGENT_HOSTNAME=AgapHost AGENT_HOSTNAME=Zabbix server
# PostgreSQL # PostgreSQL
POSTGRES_DATA_DIR=/mnt/ssd/dbs/zabbix POSTGRES_DATA_DIR=/mnt/ssd/dbs/zabbix

View File

@@ -77,7 +77,6 @@ services:
ZBX_HOSTNAME: ${AGENT_HOSTNAME} ZBX_HOSTNAME: ${AGENT_HOSTNAME}
ZBX_SERVER_HOST: zabbix-server ZBX_SERVER_HOST: zabbix-server
ZBX_SERVER_ACTIVE: zabbix-server ZBX_SERVER_ACTIVE: zabbix-server
ZBX_STARTAGENTS: "0"
volumes: volumes:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
privileged: true privileged: true