I want to use zabbix monitor with separate docker container, so, actually i have 4 containers :
zabbix-server-mysql using 10051 port
zabbix-web-nginx-mysql using 8080 port (that's work)
zabbix-java-gateway using 10052 port
mysql-server using 3306 port
zabbix-server is available on the interface zabbix and using server (vps) address and 10050 port
for exemple 193.71.58.25:10050
this is my zabbix-agent2.conf configuration using PSK
Server=172.17.0.4 --> zabbix-server-mysql IPAddress
ServerActive=172.17.0.4
Hostname=cb6b283d07ce --> Hostname of zabbix-server-mysql container
TLSConnect=psk
TLSAccept=psk
TLSPSKIdentity=PSK 100
TLSPSKFile=/etc/zabbix/zabbix_agentd2.psk
Now i have this error on the zabbix-agent2.log :
13:38:16.009644 [101] no active checks on server [172.17.0.4:10051]: host [cb6b283d07ce] not found
And looking at the
docker logs zabbix-server-mysql
i found this messages
autoregistration from "172.17.0.1" denied (host:"cb6b283d07ce" ip:"172.17.0.1" port:10050): connection type "TLS with PSK" is not allowed for autoregistration
209:20230308:134017.006 cannot send list of active checks to "172.17.0.1": host [cb6b283d07ce] not found
Any idea please to solve this issue ??
Thank you
It was simple,
I had to use the container hostname but I forgot to put it on the zabbix interface too