I m running a dockerized version of zabbix server (centos 6.0) on my host. I m also running zabbix-agent2 on this host with configuration of server with ip adress of 127.0.0.1.
When i go into zabbix frontend web interface i get these error on the detected host:
When the ip is at default value 127.0.0.1:10050:
Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused
When i change the default value to 172.17.0.1:10050 (the docker cant identify localhost of the host naturally) :
Get value from agent failed: ZBX_TCP_READ() failed: [104] Connection reset by peer
When i go to host and i ping or traceroute the host it works well. When i go to host and i try detect operating system i get the error
Cannot execute script.
sh: sudo: command not found
What can i do to make the host work properly?
I have tried to check these posts : Access localhost from docker container (when i use 172.17.0.1).
I have tried to use network_mode: host
but it conflicts with network being defined in the docker-compose.yml
I have tried this solution How to use the host network, and any other user-defined network together in Docker-Compose? but it doesnt work either
The port of the docker-compose is well defined and mapped (10051:10051)