Ad Widget

Collapse

Zabbix Agent can't return text value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stevenfoo
    Member
    • Mar 2008
    • 46

    #1

    Zabbix Agent can't return text value

    I have an agent 1.8x installed on one of unix machine.

    For example

    Userparamater=test,ps -ef | grep zabbix | tail -1 | awk '{print $9}'

    When I test it with /usr/local/bin/zabbix_agentd -t test
    it gives me ==> test [t|zabbix]

    However in the audit reporting part, I encounter
    items.error: Not supported by Zabbix Agent =>

    No matter I change the item to text, character or anything else it is still not supported.

    Any ideas?
  • Jeffj
    Junior Member
    • Apr 2007
    • 21

    #2
    Any update on this? I am having a similar issue

    The following works just fine in the Zabbix_agentd.conf on my esx server

    UserParameter=testtest,vdf -h -P

    But when I try to grep to get just the info I need the item becomes unsupported

    UserParameter=testtest,vdf -h -P | grep -E '/vmfs/volumes/494956d9-edbb9362-d658-003048c324a2' | awk '{ print $5 }'

    Any help would be appreciated.

    Jeff

    Comment

    • trikke
      Senior Member
      • Aug 2007
      • 140

      #3
      Hi,

      check in zabbix_agentd.conf, following parm should be set: UnsafeUserParameters=1

      greets
      Patrick

      Comment

      • Jeffj
        Junior Member
        • Apr 2007
        • 21

        #4
        Thanks Patrick

        I tried that, it didn't help. But I did find the following.

        The zabbix_agentd.log has the following as soon as i set UserParameter=testtest,vdf -h -P | grep -E '/vmfs/volumes/494956d9-edbb9362-d658-003048c324a2' | awk '{ print $5 }'

        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.
        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.
        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.
        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.
        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.
        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.
        Error during version check: Permission denied(13): bad permissions on /dev/vmkcall.

        does this mean that the zabbix_agentd dosn't have permission to run the command?

        Jeff

        Comment

        • Jeffj
          Junior Member
          • Apr 2007
          • 21

          #5
          I figured it out it was a permissions issue on with the /dev/vmkcall. I ended up with the following script which will give me the free space in GB for the iscsi lun, on my esx server.


          UserParameter=vdf, vdf -h -P | grep '/vmfs/volumes/4bba8646-7d9cc9d6-9114-a4badb147fc0' | awk '{ if (length($4) == 4) print substr($4,0,3); if (length($4) == 3) print substr($4,0,2); else if (length($4) == 2) print substr($4,0,1)}'

          Jeffj

          Comment

          Working...