Facing issue for pnp4nagios graph not generating bash scrip
Posted: Tue Nov 04, 2014 9:29 am
Hi Team,
I configured nagios and pnp4nagios for my envt is working fine. but for the below my bash script showing output of disk space but not generating graph into xml
format.
#!/bin/bash
total=`df -h | awk ' +$5 >=20 {print $5 " " $6}'`
echo $total > /tmp/aaa.tmp
#cat /tmp/aaa.tmp
vara=`cat /tmp/aaa.tmp | wc -c`
#echo $vara
if [ $vara -gt 1 ]
then
echo $total
exit 2
else
exit 0
fi
required help for generate graph for bash into xml format
I configured nagios and pnp4nagios for my envt is working fine. but for the below my bash script showing output of disk space but not generating graph into xml
format.
#!/bin/bash
total=`df -h | awk ' +$5 >=20 {print $5 " " $6}'`
echo $total > /tmp/aaa.tmp
#cat /tmp/aaa.tmp
vara=`cat /tmp/aaa.tmp | wc -c`
#echo $vara
if [ $vara -gt 1 ]
then
echo $total
exit 2
else
exit 0
fi
required help for generate graph for bash into xml format