Hello,
I've a problem with my external scripts.
When you look on the front-end they seem to work fine as they return the right values.
But in the zabbix_server.log I found the following:
The script check_printer_display.sh looks like:
That happens with all my scripts.
What am I doing wrong?
I've a problem with my external scripts.
When you look on the front-end they seem to work fine as they return the right values.
But in the zabbix_server.log I found the following:
Code:
2292:20081105:023750 Script /etc/zabbix/externalscripts/check_printer_display.sh returned nothing. /etc/zabbix/externalscripts/check_printer_display.sh: line 9: echo: write error: Broken pipe 2295:20081105:023751 Parameter [check_printer_display.sh[community]] is not supported by agent on host [canon] Old status [0] /etc/zabbix/externalscripts/check_printer_display.sh: line 9: echo: write error: Broken pipe 2295:20081105:024751 Parameter [check_printer_display.sh[community]] became supported by agent on host [canon]
Code:
#!/bin/bash
HOSTNAME="$1"
COMMUNITY="$2"
OUT=`snmpwalk -c $COMMUNITY -v 1 $HOSTNAME 1.3.6.1.2.1.43.18.1.1.8 | awk -F "STRING: " '{ print $2 }'`
if [ -z "$OUT" ]; then
echo "OK"
exit
else
echo "$OUT"
exit
fi
What am I doing wrong?
Comment