Ad Widget

Collapse

Zabbix Agent Status "Unknown" – Active Checks Available but Connection Issue

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bennyboyy
    Junior Member
    • Jun 2024
    • 6

    #1

    Zabbix Agent Status "Unknown" – Active Checks Available but Connection Issue

    Hi Zabbix Community,

    I’m currently facing an issue with all of my Zabbix agents where the status shows as "Unknown", while the Active checks are marked as "Available". Here’s the setup and what I’ve tried so far:

    Setup:
    • Zabbix agent is running on host 172.17.8.76, communicating with a Zabbix proxy.
    • The proxy and agent are configured to use PSK encryption.
    • Zabbix agent version is 7.0.3 (compiled with OpenSSL 1.1.1k FIPS).
    • The agent’s interface in Zabbix is set to 172.17.8.76:10050.
    Issue:
    • In the Zabbix frontend, the agent’s status is shown as "Unknown", which typically means the proxy/server has not received any data from the agent.
    • However, Active checks show as "Available", indicating the agent can communicate with the proxy/server in active mode.
    • Passive checks are not working, and the status remains "Unknown".
    What I have tried:
    1. Agent Logs: I checked the Zabbix agent logs (/var/log/zabbix/zabbix_agentd.log) and didn't find any critical errors related to the communication with the proxy.
    2. Proxy Logs: I reviewed the proxy logs (/var/log/zabbix/zabbix_proxy.log), but I haven't found any relevant errors that might explain the issue.
    3. PSK Configuration: Both the agent and proxy are configured to use PSK. I verified that the PSK identity and key match between the agent’s configuration and what’s set up in the Zabbix frontend.
    4. Connectivity: Using telnet and nc, I confirmed that the proxy can reach the agent on port 10050, and the agent can reach the proxy on port 10051.
    5. Firewall: The firewall rules on both the agent and the proxy allow communication on the required ports.
    Agent Configuration:


    Here are the relevant parts of the agent’s configuration (/etc/zabbix/zabbix_agentd.conf):

    Server=<proxy_IP>
    ServerActive=<proxy_IP>
    TLSConnect=psk
    TLSAccept=psk
    TLSPSKIdentity="my-psk-identity"
    TLSPSKFile=/path/to/psk.key


    Proxy Configuration:


    The agent is configured correctly in the Zabbix frontend with the appropriate IP address and port.

    Questions:
    • What could be causing the "Unknown" status while active checks are "Available"?
    • Are there any other logs or specific debugging steps I can follow to trace the issue with passive checks?
    • Could this be related to the PSK setup or some issue in the communication between the agent and proxy in passive mode?

    Any advice or suggestions are greatly appreciated!

    Thank you!
  • Answer selected by bennyboyy at 02-10-2024, 13:11.
    bennyboyy
    Junior Member
    • Jun 2024
    • 6

    Hi tsafx,

    I resolved my issue with help from the Discord community. A member pointed out that I needed at least one passive check to make it work, and they also mentioned that if you're entirely using active checks, you can simply remove the interface. I don't have the same issue as you, but here's the agent configuration I use, which works well for active monitoring:

    ```plaintext
    /etc/zabbix/zabbix_agent2.conf
    BufferSend=5
    BufferSize=100
    ControlSocket=/tmp/agent.sock
    DebugLevel=3
    EnablePersistentBuffer=0
    ForceActiveChecksOnStart=0
    HeartbeatFrequency=60
    Hostname=blah
    Include=/etc/zabbix/zabbix_agent2.d/*.conf
    Include=/etc/zabbix/zabbix_agent2.d/plugins.d/*.conf
    ListenIP=1.2.3.4
    ListenPort=10050
    LogFile=/var/log/zabbix/zabbix_agent2.log
    LogFileSize=100
    LogType=file
    PersistentBufferPeriod=1h
    PidFile=/var/run/zabbix/zabbix_agent2.pid
    PluginSocket=/tmp/agent.plugin.sock
    PluginTimeout=3
    RefreshActiveChecks=120
    Server=1.2.3.4/24,4.5.6.7/24
    ServerActive=zabbix.example.com,hostname.example.c om,hostname1.example.com,hostname2.example.com
    Timeout=3
    TLSAccept=psk
    TLSConnect=psk
    TLSPSKFile=/etc/zabbix/zabbix_agent.psk
    TLSPSKIdentity=youridentity
    UnsafeUserParameters=0
    ```

    Let me know if it helps!

    Comment

    • tsafx
      Junior Member
      • Jul 2018
      • 5

      #2
      Hi bennyboy
      I also have a problem with Active agent. Could you check the Queue overview? I see that "Zabbix agent (active)" is too long. I've enabled "ForceActiveChecksOnStart=1" in an agent config and checked with and without PSK. After restarting the agent data from active agent can be in the queue more than 30 seconds. It's the brand-new server with 10 hosts. There is no loading. Agents connect to Zabbix via VPN.
      Zabbix server 7.0.4
      Agent 7.0.2
      Template: Windows by Zabbix agent active

      Zabbix server can't reach an agent, I can't check Zabbix agent (non-active).
      Last edited by tsafx; 29-09-2024, 11:08.

      Comment

      • bennyboyy
        Junior Member
        • Jun 2024
        • 6

        #3
        Hi tsafx,

        I resolved my issue with help from the Discord community. A member pointed out that I needed at least one passive check to make it work, and they also mentioned that if you're entirely using active checks, you can simply remove the interface. I don't have the same issue as you, but here's the agent configuration I use, which works well for active monitoring:

        ```plaintext
        /etc/zabbix/zabbix_agent2.conf
        BufferSend=5
        BufferSize=100
        ControlSocket=/tmp/agent.sock
        DebugLevel=3
        EnablePersistentBuffer=0
        ForceActiveChecksOnStart=0
        HeartbeatFrequency=60
        Hostname=blah
        Include=/etc/zabbix/zabbix_agent2.d/*.conf
        Include=/etc/zabbix/zabbix_agent2.d/plugins.d/*.conf
        ListenIP=1.2.3.4
        ListenPort=10050
        LogFile=/var/log/zabbix/zabbix_agent2.log
        LogFileSize=100
        LogType=file
        PersistentBufferPeriod=1h
        PidFile=/var/run/zabbix/zabbix_agent2.pid
        PluginSocket=/tmp/agent.plugin.sock
        PluginTimeout=3
        RefreshActiveChecks=120
        Server=1.2.3.4/24,4.5.6.7/24
        ServerActive=zabbix.example.com,hostname.example.c om,hostname1.example.com,hostname2.example.com
        Timeout=3
        TLSAccept=psk
        TLSConnect=psk
        TLSPSKFile=/etc/zabbix/zabbix_agent.psk
        TLSPSKIdentity=youridentity
        UnsafeUserParameters=0
        ```

        Let me know if it helps!

        Comment

        • MavericksArcade
          Junior Member
          • Mar 2025
          • 2

          #4
          The solution is actually pretty simple, modify the widget to include active checks and check the box for Show only Totals, it will now include the active agents :-)
          Click image for larger version

Name:	image.png
Views:	3149
Size:	27.1 KB
ID:	500207

          Comment

          • tsafx
            Junior Member
            • Jul 2018
            • 5

            #5
            Hi
            It was the performance issue. Zabbix was not able to process the big amount of request. I changed StartTrappers=5 to StartTrappers=50 and it solved the issue.

            Comment

            Working...