I've got a problem with my external scripts.
Most of the time they're working very well, but sometimes I find those messages in my zabbix_server.log:
Item [Host:check_fan.sh[]] error: Script /etc/zabbix/externalscripts/check_fan.sh returned nothing.
8711:20100204:083254 Parameter [check_fan.sh[]] is not supported by agent on host [Host] Old status [0]
Parameter [check_fan.sh[]] became supported by agent on host [Host]
Is there something wrong with my script or what's the meaning of this?
check_fan.sh:
Most of the time they're working very well, but sometimes I find those messages in my zabbix_server.log:
Item [Host:check_fan.sh[]] error: Script /etc/zabbix/externalscripts/check_fan.sh returned nothing.
8711:20100204:083254 Parameter [check_fan.sh[]] is not supported by agent on host [Host] Old status [0]
Parameter [check_fan.sh[]] became supported by agent on host [Host]
Is there something wrong with my script or what's the meaning of this?
check_fan.sh:
Code:
#!/bin/bash
HOSTNAME="$1"
COMMUNITY="$2"
OK=1
FAILURE=""
for i in `seq 1 10` ; do
OUT=`snmpwalk -c $COMMUNITY -v 1 $HOSTNAME .1.3.6.1.4.1.x.x.x.x.x.3.$i | awk '{ print $4 }'`
# Status:
# 1 = Failure
# 2 = OK
# 3 = Unknown
if [ ! -z $OUT ]; then
if [ $OUT -eq 1 ]; then
FAILURE=$FAILURE"CRITICAL - Fan $i failed "
OK=0
fi
if [ $OUT -eq 3 ]; then
FAILURE=$FAILURE"Status of fan $i unknown "
OK=0
fi
fi
done
if [ $OK -eq 1 ]; then
echo "OK"
exit
fi
echo "$FAILURE"
exit
Comment