Ad Widget

Collapse

UserParameter: ZBX_NOTSUPPORTED

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • branson
    Junior Member
    • Feb 2011
    • 2

    #1

    UserParameter: ZBX_NOTSUPPORTED

    hey -- i've defined a UserParameter in zabbix_agentd.conf, restarted the agent, and created the item:
    x.sensor,sensors|grep "$1"|cut -c15-16|sens.sh (the script calculates the average temp and echoes the value)
    Item: Type(Zabbix agent(active)), Key(x.sensor[Core 0]), Type of information(Numeric(unsigned)), Data type(Decimal), Units(C)

    Zabbix runs the item every 30 sec, but returns a value of 0. The item stays 'Active'

    When I run zabbix_get -s <host> -k x.sensor[Core 0] from the agent host I get a blank value back, when I run it from the server I get ZBX_NOTSUPPORTED.

    What am I missing

    Thanks much for any help! I really appreciate it.
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    Have you tried running this script as the same user that your Zabbix server runs as? e.g. sudo su - zabbix, then run the script? I've found many permissions issues that way which would result in similar error messages.

    Comment

    • branson
      Junior Member
      • Feb 2011
      • 2

      #3
      Thanks for your reply -- it brought me to the next step. I ran it as the zabbix user but still with a returned value of 0. So, I did away with the script and replaced it with awk --

      x.sensor,sensors|grep "$1"|cut -c15-16|awk 'BEGIN [a=0;b=0;} {b+=$1} END {a=b/NR; print a}'

      It works when I run it myself and zabbix, and I do get a different value back from my item, but it makes little sense ..

      When run I get a correct Celsius reading, say 35.5 back, and when run through zabbix I get 8.6 or 9 or some such value back.

      Comment

      Working...