Ad Widget

Collapse

How to monitor a docker host that connects through zabbix-proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DyingMuppet
    Junior Member
    • Nov 2023
    • 4

    #1

    How to monitor a docker host that connects through zabbix-proxy

    Hi Peeps!

    I am trying to monitor a docker host and its containers that is running in our internal network.
    A Zabbix-proxy server is set up on another host in the same network which can communicate outside to a Zabbix-server in the cloud.

    Monitoring the regular values of the hosts behind the proxy is going fine as mentioned above, but the "Docker by Zabbix agent 2" template is not receiving any data.
    We have other external docker hosts that are received by the Zabbix-server without any problems.
    So, my guess is that since the interface of the hosts on the Zabbix-server are pointing to the proxy, it tries to read the docker data on the proxy server and not the actual docker host.
    But that is how far my knowledge of Zabbix behavior goes right now.

    TL;DR: Can anyone tell me if there is some kind of workaround or ability to read the docker data from behind the Zabbix-proxy?

    If you need any more information or details, please let me know.

    Thanks in advance,
    André

  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    I have not used that template myself, but looking at it (https://www.zabbix.com/integrations/docker#docker), it uses built-in items (agent2, do you have it installed?) and should be able to gather all data. It does not matter, if that host is monitored by proxy or server directly.

    I don't exactly understand, what you mean with "my guess is that since the interface of the hosts on the Zabbix-server are pointing to the proxy" .. your agent config is still the same, proxy or no proxy, it is just a dropdown there, monitored by proxy or not...

    Comment

    • DyingMuppet
      Junior Member
      • Nov 2023
      • 4

      #3
      Thanks Cyber,

      I did follow the steps on the link you entered, but I was confused when data from a non-proxied server was coming in but not from the proxied server.

      After some further investigation, I noticed I had a misconfiguration on my zabbix_agent2.conf file on the docker host.
      The zabbix-proxy address (running as a docker container on that same host) was not set as Server= and ServerActive=.
      Therefore the zabbix-agent2 did not allow the docker data to be fetched.

      I discovered this error when I was tailing the zabbix-agent2.log on the docker host and found the IP address of the container was denied access when I ran the zabbix-get command directly from the container.​

      Comment

      Working...