Check_nrpe and apan

Arzamendi, Peter parzamendi at Fiskars.com
Tue Jan 6 15:04:19 CET 2004


Hello All,
	I'm trying to use check_nrpe with the Windows pluging check_CPU
script. I want to pass the data to APAN so I can get graphs on the CPU
performance. Below is the bash script I use to feed APAN the data. The
script works fine until the CPU hits 100% then I get the error message"
: integer expression expected". I cant seem to find the problem. Anyone
have any ideas? 
Note: I changed the check_CPU wfs file to only return the CPU time. So
the out put back to my Nagios box is 4.89 

Thanks, 
Pete 

CRIT=90 
WARN=30 
HOST=TESTSERVER 
VAL=`/usr/local/nagios/libexec/check_nrpe -H $HOST -p 5666 -t 10 -c cpu`

NAME=${NAMELIST[$N]} 
TEMPL="$TEMPL:$NAME" 
DATA="$DATA:$VAL" 
echo $VAL 
VAL=`echo $VAL| cut -d "." -f 1` 
RETVAL=0
if [ $VAL -ge $CRIT ]; then 
RETVAL=2 
elif [ $VAL -ge $WARN ]; then 
RETVAL=1 
fi 
echo $RETVAL



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list