Ad Widget

Collapse

USerParameter Not Working On FreeBSD ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • motilevy
    Junior Member
    • May 2005
    • 3

    #1

    USerParameter Not Working On FreeBSD ?

    Hi ,
    I am trying to get zabbix working and have some issues.
    i have the following commnad in agentd.conf .

    UserParameter=custom.root_free,/bin/df -m / | /usr/bin/grep dev | /usr/bin/awk '{print $4}'

    output looks fine when i run it via shell
    but server reports :
    008870:20060824:235000 Parameter [custom.root_free] is not supported by agent on host [MON01] Old status [0]


    OS : FreeBSD mon01 5.4-RELEASE-p12 FreeBSD 5.4-RELEASE-p12 #2: Mon Aug 14 17:33:45 GMT 2006

    Server : zabbix_server -v
    ZABBIX Server (daemon) v1.1.1 (19 July 2006)
    Compilation time: Aug 24 2006 19:50:50

    zabbix_agentd -v
    ZABBIX Agent (daemon) v1.1.1 (19 July 2006)
    Compilation time: Aug 24 2006 19:50:50


    help ?
  • edeus
    Senior Member
    • Aug 2005
    • 120

    #2
    Zabbix agent runs under reduced privilleges so always try running your commands under the zabbix user account first.

    But I think your problem is the $4. Zabbix would be substituting an imaginary parameter 4. Add a space which is still awk "OK".

    UserParameter=custom.root_free,/bin/df -m / | /usr/bin/grep dev | /usr/bin/awk '{print $ 4}'

    Suggestion to zabbix: Only substitute when a UserParameter has values[].

    Comment

    Working...