Ad Widget

Collapse

Zabbix agent item failed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suprstar
    Junior Member
    • Feb 2013
    • 5

    #1

    Zabbix agent item failed

    I keep getting: "Zabbix agent item [custom.mdstat] on host [myhost.mydomain.com] failed: another network error, wait for 15 seconds" in my server log, I dont know why. On the host I have:

    Code:
    UserParameter=custom.mdstat,sudo /opt/megaraid/check_lsi_raid.py | grep -c "All arrays OK"
    in /usr/local/etc/zabbix_agentd.conf, and it appears to be working:

    Code:
    root@myhost:/usr/local/etc# zabbix_agentd -t custom.mdstat
    custom.mdstat                                 [t|1]
    The '1' is the return value I expect and want to see triggered if it comes back 0. I have a similar setup with linux software raids that is working perfectly. I have this line in the /etc/sudoers:

    Code:
    zabbix ALL=(ALL) NOPASSWD:/opt/megaraid/check_lsi_raid.py
    which appears to be effective when I run with user zabbix on a command line:

    Code:
    root@myhost:/usr/local/etc# su - zabbix -c "sudo /opt/megaraid/check_lsi_raid.py"
    No directory, logging in with HOME=/
    RAID OK: All arrays OK [1 array checked on 1 controller]
    What am I missing here??
  • suprstar
    Junior Member
    • Feb 2013
    • 5

    #2
    The answer ended up being the 3 second timeout. The raid check takes about 6 seconds to complete, upping the timeout value on both server and agent made it ran perfectly.

    Comment

    Working...