Ad Widget

Collapse

Disable passive check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fra
    Junior Member
    • May 2015
    • 4

    #1

    Disable passive check

    Hi all,

    I have a problem when monitoring a host. The error message is the following:

    Code:
    Get value from agent failed: cannot connect to [[IP]:PORT]: [111] Connection refused
    I have enabled the active check, but the server is unable to connect to the agent, as reported above.
    In such a scenario, is the monitoring working anyway, or must the server estabilish a connection before visualizing monitoring data?
    I also wonder whether the passive check is executed also when the active check is enabled. If this is the case, is it possible to disable it?
    The reason I'm asking is that the agent is blocked by firewall, and I would like to avoid forwarding ports on the router.

    Thanks in advance for any help or suggestion.
  • Parasin
    Member
    Zabbix Certified Specialist
    • Dec 2014
    • 53

    #2
    Zabbix agents run in both active and passive modes unless you specifically disable passive or active checks.

    If the agent is given passive items to check, then it does passive checks. At the same time, you can pass that same agent active checks and it will return them as active checks.

    In your case, you must check the Zabbix Agent log on the server to see if it is even getting the list of active checks from the server. It would seem to me that the agent is not getting the active checks from the server. The agent will not monitor anything yet; it can't get the keys that it needs to monitor.

    It is possible to completely disable passive checks by changing the zabbix_agentd.conf file to the following:

    Code:
    ### Option: StartAgents
    #       Number of pre-forked instances of zabbix_agentd that process passive checks.
    #       If set to 0, disables passive checks and the agent will not listen on any TCP port.
    #
    # Mandatory: no
    # Range: 0-100
    # Default:
     StartAgents=0

    If you don't want to open ports, you can create a permanent SSH tunnel between your servers using AutoSSH. I have done this with one of my systems and have found great results that make navigating through tricky corporate Network prisons relatively easy.
    Last edited by Parasin; 13-05-2015, 18:14.

    Comment

    • fra
      Junior Member
      • May 2015
      • 4

      #3
      Thanks for the reply.

      I solved the issue by putting the StartAgents = 0 line in the agent configuration file.
      I changed the type of items from "Zabbix Agent" to "Zabbix Agent (active)".
      In this way only the agent is connecting to the server.

      Thanks again for your suggestions.

      Comment

      • sxc7541
        Junior Member
        • Aug 2015
        • 4

        #4
        Prevents monitoring of agent by server?

        Hi there,

        I found this (
        Code:
        StartAgents=0
        ) of interest as it helps saving 3 redundant processes on each monitored host.

        However, I noticed a side effect: under Configuration->Hosts the 'Z' icon - which indicates that the agent is pingable from the server - remains grey. It's peculiar because under Latest Data, I have a fresh "Agent ping" timestamp for that box.

        Is this a concern; for example, could that possibly prevent the server to detect/report that the agent/host has gone down?

        I used "Active Agent auto-registration" as described here. Server and Agent are running version 2.2.9 on Ubuntu 14.04 LTS.

        Comment

        Working...