Ad Widget

Collapse

Variable parameters not working.. cockpit problem?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tball
    Junior Member
    • Apr 2006
    • 10

    #1

    Variable parameters not working.. cockpit problem?

    I’ve read all threads and docs I can find on this, and tried many suggestions but I’m still stuck. Working with the variable parameters, I’m simply trying to probe a UserParameter with a single variable. I can run on the script called in the UserParameter w/o problem on the command line and also call it from the zabbix_server item without a parameter and they both work. I must be overlooking something minor. Can someone take a look at my set up and give any thoughts? Many thanks,
    Tom

    Zabbix Server = Fedora 4 Zabbix v1.1beta8
    Zabbix Agent = Sun v440, Solaris 9

    zabbix_agentd.conf:
    UserParameter=getstat[$1],/tmp/get.stat.ksh $1

    I’ve also tried this:
    UserParameter=getstat[*],/tmp/get.stat.ksh $1


    root@srv1-> cat /tmp/get.stat.ksh
    #!/bin/ksh
    /opt/RICHPse/bin/se /opt/RICHPse/examples/aw.se -x -c -y | grep $1 | awk -F: '{print $2}'

    root@srv1-> /tmp/get.stat.ksh Vfork
    1442393
    root@srv1-> echo $?
    0

    root@srv1-> cat /tmp/zabbix_agentd.log
    009802:20060414:145836 Got line:getstat[Vfork]
    009802:20060414:145836 Sending back:ZBX_NOTSUPPORTED
    Last edited by tball; 18-04-2006, 21:38.
  • tball
    Junior Member
    • Apr 2006
    • 10

    #2
    For what it's worth, I found the problem. The 1.1beta3 zabbix_agentd file (dated Dec 9) has the problem. The zabbix_agentd file 1.1beta2 (dated Oct 13) is ok. These are the compiled files from the zabbix site.

    This is the working .conf entry:
    UserParameter=getstat[*],/tmp/get.stat.ksh $1

    And this is the working script:
    /opt/RICHPse/bin/se /opt/RICHPse/examples/aw.se -x -c -y | grep "$1" | awk -F: '{print $2}'

    Hope this might help others.

    Comment

    Working...