Ad Widget

Collapse

UserParameter one more time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tbi
    Junior Member
    • Jun 2012
    • 2

    #1

    UserParameter one more time

    Hello,
    i have a problem with my UserParameter in zabbix_agentd.
    I use the following command:

    UserParameter=raid.online,megacli -PDList -aAll | egrep "state: Online" | wc -l
    i test my parameter
    [root@ ~]# /usr/local/zabbix/sbin/zabbix_agentd -t raid.online
    raid.online [t|4]
    but in zabbix_agentd.log on client side I received 0 [i was expecting 4]
    14811:20120604:121338.505 Run remote command [megacli -PDList -aAll | egrep "state: Online" | wc -l] Result [1] [0]...
    14811:20120604:121338.505 Sending back [0]
    also when i try to run zabbix_get it gets 0:

    [root@ ~]# zabbix_get -s 10.192.64.2 -k raid.online
    0
    can anybody could help me to resolve these problems?
  • GArmao
    Zabbix Certified Specialist
    Zabbix Certified Trainer
    Zabbix Certified Specialist
    • Mar 2010
    • 135

    #2
    userparameter runs as "zabbix" user, not root (unless you forced the agent to run as root), maybe the "zabbix" user doesn't have permission to run the "megacli" executable? try running the command as the "zabbix" user on the machine and check the output

    Comment

    • tbi
      Junior Member
      • Jun 2012
      • 2

      #3
      hi,
      you were right. zabbix doesn't have permission to run this command.
      thanks.

      Comment

      Working...