Ad Widget

Collapse

Problem with zabbix 2.0.9 and item "Not supported by Zabbix Agent"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • juaqli
    Junior Member
    • Dec 2013
    • 3

    #1

    Problem with zabbix 2.0.9 and item "Not supported by Zabbix Agent"

    Hello. I have one zabbix-agent in the same host of zabbix-server.

    I defined this key:
    UserParameter=ntpoff,/tmp/ntp_offset.sh

    ntp_offset.sh script is very simple:
    1) write in log date start
    2) launch ntpq and extract offset. Save offset in variable
    3 print to stdout offset and write to log file.
    3) write in log date stop

    I launched tail -f log zabbix-server and ntp_offset.sh script and obtain:
    mar dic 10 20:38:14 CET 2013 Iniciando...
    mar dic 10 20:38:14 CET 2013 VALOR: -23.366-
    mar dic 10 20:38:14 CET 2013 Fin
    mar dic 10 20:39:14 CET 2013 Iniciando...
    mar dic 10 20:39:14 CET 2013 VALOR: -23.366-
    mar dic 10 20:39:14 CET 2013 Fin
    mar dic 10 20:40:14 CET 2013 Iniciando...
    mar dic 10 20:40:14 CET 2013 VALOR: -23.366-
    mar dic 10 20:40:14 CET 2013 Fin
    mar dic 10 20:41:14 CET 2013 Iniciando...
    2154:20131210:204119.306 item [zabbixs.xxxx:ntpoff] became not supported: Not supported by Zabbix Agent
    mar dic 10 20:45:14 CET 2013 Iniciando...
    mar dic 10 20:45:15 CET 2013 VALOR: -23.366-
    mar dic 10 20:45:15 CET 2013 Fin
    2155:20131210:204517.067 item [zabbixs.xxxx:ntpoff] became supported
    mar dic 10 20:46:14 CET 2013 Iniciando...
    mar dic 10 20:46:14 CET 2013 VALOR: -23.366-
    mar dic 10 20:46:14 CET 2013 Fin
    mar dic 10 20:47:14 CET 2013 Iniciando...
    mar dic 10 20:47:14 CET 2013 VALOR: -23.366-
    mar dic 10 20:47:14 CET 2013 Fin
    mar dic 10 20:48:14 CET 2013 Iniciando...
    mar dic 10 20:48:14 CET 2013 VALOR: -22.746-
    mar dic 10 20:48:14 CET 2013 Fin

    Randomly, I don't find why zabbix-agent don't launch script.

    I have this item and also fail:
    UserParameter=ntpnum,/usr/sbin/ntpq -p | grep -c "^*"

    However, this work perfectly:
    UserParameter=site,echo cadena_string

    I don't understand it. I have seven host, same problems in all.

    Somebody has any ideas?
    Thanks
  • frater
    Senior Member
    • Oct 2010
    • 340

    #2
    It could be a timing issue...
    How fast will your host give this info?

    How many seconds is your timeout set in Zabbix?
    Code:
    # grep '^Timeout' /etc/zabbix/zabbix_server.conf
    Timeout=30
    You should post ntp_offset.sh
    I have written many scripts for Zabbix and know about several pitfalls.
    You should make sure your script always returns a value.
    Why is your script in /tmp ?
    Last edited by frater; 16-12-2013, 16:06.
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

    Comment

    • juaqli
      Junior Member
      • Dec 2013
      • 3

      #3
      Thank you for response

      I already had set Timeout to 30 sg

      If I understand well, my script don't start. If script will take more than 30sg, I will see in log file start date (first line of script).

      I'm trying to find root cause

      Comment

      Working...