Page 1 of 1

Facing issue for pnp4nagios graph not generating bash scrip

Posted: Tue Nov 04, 2014 9:29 am
by khushalpar
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 :(

Re: Facing issue for pnp4nagios graph not generating bash sc

Posted: Tue Nov 04, 2014 5:40 pm
by abrist
You need to output performance data in your plugin. See the following plugin dev guidelines:
https://nagios-plugins.org/doc/guidelines.html

Re: Facing issue for pnp4nagios graph not generating bash sc

Posted: Thu Nov 06, 2014 5:23 am
by khushalpar
Can you convert my script to as suggested into nagios plugin ??

Re: Facing issue for pnp4nagios graph not generating bash sc

Posted: Thu Nov 06, 2014 2:30 pm
by abrist
No. This is something you are expected to do. You are welcome to contact [email protected] for a custom development quote.