My Own Plugin Issues

Net Warrior netwarrior863 at gmail.com
Wed Apr 17 22:19:43 CEST 2013


Hi guys.
I tried to create my own plugin to check disk space and I'm almost done
except that the plugin is not returning the expected data:
If i run the plugn from the command line I get:

/usr/lib/nagios/plugins/check_diskl.sh 80 90 /home
Critical  Disk Space /home - Total: 985M - Usado: 970M - Libre 0

But from nagios I get:
 free space: /home 0 MB (0% inode=94%): Do not know where on earth the
inode information is taken from and is not the format expected I want this:

Critical  Disk Space /home - Total: 985M - Usado: 970M - Libre 0


My script ends with
echo $RESULT
exit 0;

Where result is:
RESULT="$NOMBREDIR  Total: $ESPACIOTOTAL  Usado: $ESPACIOUSADO  Libre
$ESPACIOLIBRE"

This is the final part :
-- snip---

if [  "$PORCENTAJE" -ge "$CRIT"  ]; then
        echo "Critical $RESULT";
        exit 2;
fi

if [ "$PORCENTAJE" -ge "$WARN" ]; then
        echo "Warning  $RESULT";
        exit 1;
fi

echo $RESULT
exit 0;


I'm ai missing something else?

Any advice really appreciated
Thanks
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130417/216a68c1/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
-------------- next part --------------
_______________________________________________
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