Ad Widget

Collapse

Dynamically setting a trigger to ZBX_NOTSUPPORTED?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • to0
    Junior Member
    • Jan 2013
    • 2

    #1

    Dynamically setting a trigger to ZBX_NOTSUPPORTED?

    I have taken over the Zabbix setup of a previous administrator that monitors haproxy statistics via shell scripts and UserParameter entries in zabbix_agentd.conf. We have a virtual IP address that we swing between two different nodes and haproxy binds to that virtual IP. Currently, Zabbix gathers data for the active haproxy node and the inactive node's triggers say that they are unsupported by the agent. When I move the virtual IP address to the other node, Zabbix begins gathering data for it properly and the other node is comes up as unavailable again. Only the haproxy triggers have this error message; the others are all available with valid and new data coming in.

    Here's an example of what I mean:
    Code:
    # zabbix_get -s inactive_node -p 10050 -k proxy1.status
    ZBX_NOTSUPPORTED
    # zabbix_get -s active_node -p 10050 -k proxy1.status
    UP
    The haproxy shell script returns "UP" if everything is working, "DOWN" if it's not working, and "" if the node is inactive. After copying the database and all configuration files into a new lab environment, I'm not getting the same behavior as above anymore:

    Code:
    # zabbix_get -s inactive_node -p 10050 -k proxy1.status
    
    # zabbix_get -s active_node -p 10050 -k proxy1.status
    UP
    My question is, how can I get it to return ZBX_NOTSUPPORTED instead of the actual blank string?

    Thank you...
  • to0
    Junior Member
    • Jan 2013
    • 2

    #2
    Never mind, this turned out to be some weird behavior from the agent. In 1.8.9, if the script returned a blank string, it was set to unsupported, whereas in later versions, the value is set to the blank string.

    Comment

    Working...