Ad Widget

Collapse

Zabbix Agent unreachable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rajaseck
    Junior Member
    • Apr 2021
    • 6

    #1

    Zabbix Agent unreachable

    Hello, I wanted to consult you about a problem that I am having with the hosts that I am adding to the Zabbix, after installing the agent and adding the templates. The agent configuration is the same as on old occasions but for some reason it is not correct, it tells me that the host is unreachable and when I go to the hosts section it does not mark the ZBX option as available as if it does with the rest. It is worth narrowing that I mean local host behind a zabbix proxy. Do you have any idea what might be going on? Thank you
  • mwildam
    Member
    • Feb 2021
    • 72

    #2
    If you have the new hosts in different network segments there might not be a route to the appropriate hosts.
    And double check your zabbix_agentd.conf for entries in "Server" and "ServerActive" - zabbix server - if multiple network interfaces there - could probably send from a different ip with your host and hence not accepted by the destination host(s). Further:
    1. On the zabbix server try:
      Code:
      telnet monitoredhost 10050
    2. On the monitored host try:
      Code:
      telnet zabbixserver 10051
    3. Test agent on monitored machine (show all known items):
      Code:
      zabbix_agentd -p
      Code:
      zabbix_agentd -t system.hostname
    4. From server to remote agent:
      Code:
      zabbix_get -s monitoredhost -k agent.hostname

    Comment

    • Rajaseck
      Junior Member
      • Apr 2021
      • 6

      #3
      Hi,
      Thank you for your answer, here is what I've got, I don't know if I've done it right because don't have much knowledge about Zabbix really:

      1.On the zabbix server (my zabbix proxy) try:
      Code: telnet monitoreshost (my monitored host IP) 10051
      Result: Trying 192.168.75.61...
      Connected to 192.168.75.61.
      Escape character is '^]'.
      Connection closed by foreign host.

      2.On the monitored host try:
      Code: telnet zabbixserver (my zabbix proxy IP) 10051
      Result: Successful connection

      3.Test agent on monitored machine
      Code: zabbix_agentd -p
      Result: C:\Program Files\Zabbix Agent>zabbix_agentd -p
      agent.hostname [s|ALEVM]
      agent.ping [u|1]
      agent.version [s|3.4.7]
      system.localtime[utc] [u|1617726021]
      system.run[echo test] [m|ZBX_NOTSUPPORTED] [Remote commands are not enabled.]
      web.page.get[localhost,,80] [t|HTTP/1.1 200 OK
      Content-Type: text/html
      Last-Modified: Tue, 29 Oct 2019 14:59:11 GMT
      Accept-Ranges: bytes
      ETag: "8061e36b698ed51:0"
      Server: Microsoft-IIS/10.0
      X-Powered-By: ASP.NET
      Date: Tue, 06 Apr 2021 16:20:22 GMT
      Connection: close
      Content-Length: 703...
      ... and so on

      4.From server (my zabbix proxy) to remote agent:
      Code: zabbix_get -s monitoredhost(my monitored host IP) -k agent.hostname (my monitored host DNS name)

      Command 'zabbix_get' not found, but can be installed with:

      Result: apt install zabbix-proxy-mysql
      apt install zabbix-proxy-pgsql
      apt install zabbix-proxy-sqlite3
      apt install zabbix-server-mysql
      apt install zabbix-server-pgsql


      thanks in advance.

      Regards

      Comment

      • mwildam
        Member
        • Feb 2021
        • 72

        #4
        1. - 2. is ok - so server can connect to monitored host by network and vice versa.
        3. is ok - Agent is working on the monitored host.
        4. Not sure if this should work, but try the 4. from the main server (not from the proxy).
        And 4a) maybe you can copy just the zabbix_get executable from main server to proxy and then test from the proxy.

        Comment

        • Rajaseck
          Junior Member
          • Apr 2021
          • 6

          #5
          Hello, yes, it is monitored by Zabbix Proxy as you can see in the attachment. On the other hand I should install the zabbix_get to make possible the testing but I wanted to know if I would have to take anything into account before doing so, because I see that it tells me that it is installed by running any of the following commands: apt install zabbix-proxy-mysql
          apt install zabbix-proxy-pgsql
          apt install zabbix-proxy-sqlite3
          apt install zabbix-server-mysql
          apt install zabbix-server-pgsql .

          Which should I use in my zabbix proxy in this case? will affect anything you already have installed? thanks

          Best regards

          Attached Files

          Comment

          • mwildam
            Member
            • Feb 2021
            • 72

            #6
            For the zabbix_get and zabbix_sender you would need the zabbix-agent package (if I am not wrong - I installed from the sources and just copied over the zabbix_get, zabbix_sender executables - maybe this is sufficient for you also for testing).

            Comment

            • Rajaseck
              Junior Member
              • Apr 2021
              • 6

              #7
              Hello, I have looked at my windows host and the zabbix_get comes bundled within the zabbix-agent package, however, on my zabbix proxy or on hosts monitored with ubuntu don't, even though they have the zabbix-agent and the zabbix_sender, how could I add the zabbix_get in this case? thank you.

              Comment

              • mwildam
                Member
                • Feb 2021
                • 72

                #8
                There are several posts on this - and honestly I don't understand that either. However, most probably it is sufficient if you copy the zabbix_get there manually without dependency problems.

                Comment

                • Rajaseck
                  Junior Member
                  • Apr 2021
                  • 6

                  #9
                  Hi,

                  I'm trying to isntall the package through this command line: sudo apt install zabbix-get but I got the attach message.

                  Kind regards

                  Attached Files

                  Comment

                  • mwildam
                    Member
                    • Feb 2021
                    • 72

                    #10
                    But this is a totally different issue and does not have anything to do with zabbix. Your problem is, that a package manager - such as aptitude or the graphical synaptic or the gnome-software manager - is open and blocking the access to the package manager. Close it and you can proceed with your install.

                    Comment

                    • Rajaseck
                      Junior Member
                      • Apr 2021
                      • 6

                      #11
                      Hi,

                      I've killed the apt process "apt install zabbix-proxy-mysql" and tried to execute the "sudo apt install zabbix-get", and this time I received the attach message...
                      Attached Files

                      Comment

                      • mwildam
                        Member
                        • Feb 2021
                        • 72

                        #12
                        Why did you kill the apt install zabbix-proxy-mysql process? - Maybe it was waiting ther for an answer. Now it would be the best to run the command that the message is writing as a proposal to repair the installation status.

                        Comment

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

                          #13
                          Zabbix-get has its own installation package in Linux. Does not install together with agent....

                          Comment

                          Working...