Ad Widget

Collapse

Zabbix UserParameter returns empty value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PlatonicShroom
    Junior Member
    • Oct 2016
    • 1

    #1

    Zabbix UserParameter returns empty value

    Hello everyone.

    I think I might have run into a zabbix quirk, I'm running Zabbix 3.0.4 on ubuntu 14.04 LTS.

    Currently I've configured a UserParameter on a zabbix agent to execute an fping command to measure latency in an internal VPN tunnel.

    the command looks as followed:
    Code:
    UserParameter=tun.ping,fping -e -q -p 1000 -c 1 10.9.8.1 2>&1 | sed -n 's%^.* = .* = .*/\(.*\)/.*%\1%pg'

    On the machine itself testing the key returns a desired result:

    Code:
    # /usr/sbin/zabbix_agentd -t tun.ping
    tun.ping                                      [t|2.89]
    Above command executes in under a second and the timeout in the agent config file is set to 6 seconds.

    However the zabbix server seems to not agree with the result.
    Screenshot below reveals the server reports "NOT SUPPORTED" with as reason "Received value [] is not suitable for value type [Numeric (float)]"
    http://prntscr.com/cokccs (ps. i've tried with a decimal value, same result), it is worth noting the zabbix agent was restarted prior to testing.

    Please note changing the key to below userparameter does get accepted by Zabbix Server and data proceeds to get logged.

    Code:
    UserParameter=key.test,echo 1.01
    anyone have an idea ?
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    Maybe try text type ? restart agent and server and add debug to here again

    Comment

    • peatb
      Zabbix Certified Trainer
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Aug 2016
      • 36

      #3
      Originally posted by PlatonicShroom
      "Received value [] is not suitable for value type [Numeric (float)]"
      This means zabbix receives an empty response from the userparameter, so changing the type won't help.

      When the zabbix agent executes the commands somehow an empty response is created. This could be because of path and permission errors. Try setting the zabbix agent to debug level 4 and check the log to determine the error.

      You can also try
      Code:
      $ sudo -u zabbix  /usr/sbin/zabbix_agentd -t tun.ping

      Comment

      Working...