Facing issue for pnp4nagios graph not generating bash scrip

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
khushalpar
Posts: 12
Joined: Tue Apr 29, 2014 1:11 am

Facing issue for pnp4nagios graph not generating bash scrip

Post 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 :(
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Facing issue for pnp4nagios graph not generating bash sc

Post by abrist »

You need to output performance data in your plugin. See the following plugin dev guidelines:
https://nagios-plugins.org/doc/guidelines.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
khushalpar
Posts: 12
Joined: Tue Apr 29, 2014 1:11 am

Re: Facing issue for pnp4nagios graph not generating bash sc

Post by khushalpar »

Can you convert my script to as suggested into nagios plugin ??
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Facing issue for pnp4nagios graph not generating bash sc

Post by abrist »

No. This is something you are expected to do. You are welcome to contact [email protected] for a custom development quote.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked