Ad Widget

Collapse

Zabbix servers on Docker keep showing in problem in dashboard - is it normal ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jainrohitk
    Junior Member
    • Sep 2018
    • 2

    #1

    Zabbix servers on Docker keep showing in problem in dashboard - is it normal ?

    Hello Zabbix Team,
    I've finished the zabbix server installation on Docker. I can see other agents are registering themselves as green without having any problem but zabbix server is keep showing in red & showing in problem in main dashboard.

    The problem says "Zabbix agent on Zabbix server is unreachable for 5 minutes" . I know that we do not have zabbix agent running in the same zabbix server container so let me know what to do with this problem. PFA.

    Listing what all I tried.

    1) Setup the mysql-server docker container & installed zabbix schema inside. --> Working perfectly fine.
    2) Setup the zabbix-java-gateway container --> Working perfecly fine.
    3) Setup zabbix-server-mysql --> Docker logs shows working perfectly fine.
    4) Setup the zabbix-web-nginx-mysql container --> Working perfectly fine.

    Please let me know the resolution.

    Thanks,
    Rohit

    Click image for larger version

Name:	Zabbix_Error.PNG
Views:	18240
Size:	300.7 KB
ID:	366319


  • Mechanix
    Member
    • Jan 2017
    • 92

    #2
    same issue here

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      I started up with Docker Compose using YAML below.
      docker-compose_v3_centos_mysql_latest.yaml

      I changed the setting as follows.

      .env_agent
      -----
      # ZBX_HOSTNAME=
      -----
      to
      -----
      ZBX_HOSTNAME=Zabbix server
      -----

      .env_web
      -----
      # PHP_TZ=Europe/Riga
      -----
      to
      -----
      PHP_TZ=Asia/Tokyo
      -----

      Host Agent Interface setting
      -----
      127.0.0.1 IP Address
      -----
      to
      -----
      zabbix-agent DNS
      -----

      Comment

      • aztazt
        Junior Member
        • Feb 2019
        • 2

        #4
        Hi,

        It's my first post here, and my first zabbix try.
        I just would like to say that I'm having exact same issue in my fresh installation of zabbix (zabbix server official docker + zabbix web nginx for mysql official docker + docker/mysql 5.7 official docker) on a 18.04 ubuntu host.

        Now, I have to find out how to add a windows host with Zabbix Agent + conf file + Windows service installed into zabbix server.

        Comment

        • James147
          Junior Member
          • Feb 2019
          • 1

          #5
          Hey there i was also facing same issue.By seeing above comment i think adding a host with Zabbix has must be tried.Will try it soon and inform u whether its working or not. mybkexperience
          Last edited by James147; 25-02-2019, 13:21.

          Comment

          • Noek
            Junior Member
            • Mar 2019
            • 4

            #6
            Maybe bit of a late response, but why would you want to monitor a dockerised service? Don't you monitor the container itself? I just have spun up a container with the latest all-in-one package on Ubuntu 18.04 after i've ran Zabbix on a standalone VM for 9 months. First thing i noticed was the error. Second thing i did was disabling the "zabbix server" host to remove it from monitored host and thus removing the error.

            Also noticed that the "zabbix server" agent is configured on 10050, but the container i just downloaded mapped port 10051 externally. So that is also problably why you get a error.
            Last edited by Noek; 27-06-2019, 13:36.

            Comment

            • mdiorio
              Junior Member
              • Mar 2016
              • 27

              #7
              Of corse you want to monitor the Zabbix server itself. Maybe not CPU and Memory, but one of the templates relates to monitoring Zabbix's internal processes such as number of processed values per second. It directly relates to the performance of the zabbix server itself.

              It appears that the Zabbix Server image has no agent installed at all, which is why we aren't seeing the metrics flowing in from the server.

              Comment

              • aleguedes1983
                Junior Member
                • Jul 2019
                • 4

                #8
                Hey team, It seems that this is a +1-year-old question. Take a look here: https://www.zabbix.com/forum/zabbix-...rver-container

                I started to apply the Zabbix dockerized situation and run exactly the same issue. Apparently, as mdiorio said, there is no agent installed in the docker Server.

                It seems that just installing the agent and configuring it manually would solve the issue, however, the Zabbix development team should consider this issue when creating the Zabbix Docker Server in order to avoid this issue in the future...

                Monitoring the Zabbix server is really important. In my Cloud environment, where I need to monitor +200 nodes across the world, not having good information on the server itself is terrible.

                Thx,

                Comment

                • gmork123
                  Junior Member
                  • Oct 2019
                  • 1

                  #9
                  I solved this by starting a zabbix/zabbix-agent beside the zabbix/zabbix-server-mysql (and web container) and managed to get them talking together by putting them in the same network.

                  Agent is started with the following env:
                  Code:
                   
                   env:   ZBX_HOSTNAME: "Zabbix server"   ZBX_SERVER_HOST: "zabbix-server,172.0.0.0/8"
                  The IP range is from my docker bridge network and in the zabbix admin I pointed the agent interface from "Zabbix server" to the DNS name zabbix-agent

                  Comment

                  • nicolimo86
                    Junior Member
                    • Nov 2019
                    • 2

                    #10
                    The problem is the following:
                    zabbix-server is looking for the zabbix-agent on 127.0.0.1:10050, but because zabbix-agent runs on a separate container that check need to be updated using the IP of the container that is running the zabbix-agent.

                    In this video there is the explanation of how to solve the problem: https://youtu.be/ScKlF0ICVYA?t=957

                    Comment

                    • batchen_regev
                      Member
                      • Aug 2018
                      • 80

                      #11
                      If anyone still get this issue, simply go to - > Configuration - > Hosts -> Zabbix Server
                      And inside change the "Agent interface" from IP to DNS, delete the ip 127.0.0.1 and add under "DNS name" - zabbix-agent

                      This has worked for me on : zabbix/zabbix-server-pgsql:ubuntu-4.4.6

                      Comment

                      • Noek
                        Junior Member
                        • Mar 2019
                        • 4

                        #12
                        Would like to give an update on this since i picked up my interest in Zabbix again (it has been running fine the whole time). As aleguedes1983 points out, there is no zabbix-agent in the Docker image.
                        I managed to get the CPU-stats working (other stats of collector performance etc where already working from the start afaik). What i did was:
                        • start zabbix-agent 4.2 in --privileged mode to allow gathering machine information in container;
                        • configured zabbix-server and zabbix-agent to have a static ip on the network `zabbix-backend` so that it doesn't mather which one boots first (and gets a DHCP address assigned)
                        Data now flows in properly.

                        Comment

                        • jchavezb
                          Junior Member
                          • Jan 2021
                          • 5

                          #13
                          The explanation is very simple, 127.0.0.1 is the operating system base and not your zabbix docker container.

                          You must do the follow (in you operating system base, example your ubuntu).

                          root@docker-ubuntu-s-1vcpu-1gb-tor1-01:~/zabbix-docker# docker ps | grep agent
                          0b2d46136502 zabbix/zabbix-agent:alpine-5.2-latest "/sbin/tini -- /usr/…" 42 hours ago Up 7 minutes zabbix-docker_zabbix-agent_1

                          Now you must use the first three characters to do
                          root@docker-ubuntu-s-1vcpu-1gb-tor1-01:~/zabbix-docker# docker inspect 0b2

                          then, you must search the IPAddress parameter:

                          ],
                          "NetworkID": "4edccbac9d1ac82d447c21d9d3047cc6a11bdd16d583b d671 a047047318edaba",
                          "EndpointID": "b661df81139938dd0ceaf5ac3a4ae5769a84a636dbbc7 51e9 1dc7b274a8756eb",
                          "Gateway": "172.16.239.1",
                          "IPAddress": "172.16.239.7",
                          "IPPrefixLen": 24,
                          "IPv6Gateway": "",
                          "GlobalIPv6Address": "",
                          "GlobalIPv6PrefixLen": 0,
                          "MacAddress": "02:42:ac:10:ef:07",
                          "DriverOpts": null
                          }

                          and copy and replace it in zabbix server configuration instead 127.0.0.1.
                          Last edited by jchavezb; 26-01-2021, 01:03.

                          Comment

                          Working...