Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

utahluge

Reviews(3)
I modified the end of this to give critical to any critical issues. Then if nothing critical, it checks for any high alerts which outputs as a warning.
###########
if [[ $CRIT_VULNS -gt $CRITICAL_THRESHOLD ]]; then
echo "CRITICAL - There are $CRIT_VULNS critical and $HIGH_VULNS high vulnerabilities in $TARGET_SCAN. | $PERF_DATA"
exit 2
elif [[ $HIGH_VULNS -gt $WARNING_THRESHOLD ]]; then
echo "WARNING - There are $CRIT_VULNS critical and $HIGH_VULNS high vulnerabilities in $TARGET_SCAN. | $PERF_DATA"
exit 1
else
echo "OK - There are $CRIT_VULNS critical and $HIGH_VULNS high vulnerabilities in $TARGET_SCAN. | $PERF_DATA"
exit 0
fi

echo "UNKNOWN - Check script output"
exit 3
byutahluge, January 30, 2017
Hey nice work. I wrote a little wrapper for this to check on every mount point. A little more dynamic for systems where a mount point may get missed by accident.

#! /bin/bash

# Wrapper script for check_hdd_inodes
# Checks all mount points in one easy output

if [ $# -ne 2 ]
then
echo "Usage: $0 [warn %] [crit %]"
exit 3
fi

loc="/usr/local/bin/check_hdd_inodes"
out=""

for s in `df -ilP | cut -d"%" -f2 | grep "/"`
do
getStat=`$loc -w $1 -c $2 -p $s`
out=`echo -e "$getStat
$out"`
done
out=`echo "$out" | sed s/"|"/"\n "/g`

if [ `echo "$out" | cut -d";" -f1 | grep CRITICAL | wc -l` -gt 0 ]
then
echo -e "CRITICAL: inodes above $1 % threshold. Click service name for more info.

$out"
exit 2
elif [ `echo "$out" | cut -d";" -f1 | grep WARNING | wc -l` -gt 0 ]
then
echo -e "WARNING: inodes above $1 % threshold. Click service name for more info.

$out"
exit 1
elif [ `echo "$out" | cut -d";" -f1 | grep OK | wc -l` -gt 0 ]
then
echo -e "OK: inodes below thresholds. Click service name for more info.

$out"
exit 0
fi

echo "Oops; something went wrong :("
exit 3
byutahluge, December 18, 2015
After trying a bunch of other ssl cert plugins, this one works right out of the box on a minimal install O.S. Thank you very much!