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

knasucre22

Reviews(1)
byknasucre22, August 8, 2013
Hi,
Good plugin !!
I added the feature to get log_used gauge and also "rates" from status file.
The parameter should be rates_xxx where xxx is the rate you want to get.
I don't care about warning and critical, I need rates only for my graphs.

This is the result of the diff between your and my version.
109a110,112
> # delete EOL in XML key
> sed ':a;N;$!ba;s/\"\n/\"/g' ${STATUSFILE} > ${STATUSFILE}.tmp && mv ${STATUSFILE}.tmp ${STATUSFILE}
>
297,298c300,332
IPORTPAR=`grep log_used $STATUSFILE | cut -d\" -f 4`
> if [ $IPORTPAR -ge $PAR_WARN ]; then
> if [ $IPORTPAR -ge $PAR_CRIT ]; then
> exitstatus=${STATE_CRITICAL}
> echo "LOG DISK SPACE CRITICAL: $IPORTPAR%" "| RESULT=$IPORTPAR%;$PAR_WARN;$PAR_CRIT;"
> else
> exitstatus=${STATE_WARNING}
> echo "LOG DISK SPACE WARNING: $IPORTPAR%" "| RESULT=$IPORTPAR%;$PAR_WARN;$PAR_CRIT;"
> fi
> else
> exitstatus=${STATE_OK}
> echo "LOG DISK SPACE OK: $IPORTPAR%" "| RESULT=$IPORTPAR%;$PAR_WARN;$PAR_CRIT;"
> fi
> ;;
> rates_*)
> SEARCH=`echo -n $ARGS | cut -c 7-`
> IPORTPAR1=`grep $SEARCH $STATUSFILE | grep rate | cut -d\" -f 4`
> IPORTPAR5=`grep $SEARCH $STATUSFILE | grep rate | cut -d\" -f 6`
> IPORTPAR15=`grep $SEARCH $STATUSFILE | grep rate | cut -d\" -f 8`
> if [ "$IPORTPAR1" == "" ]; then
> exitstatus=${STATE_UNKNOWN}
> echo "Rate $SEARCH UNKNOWN : unable to get data from Ironport, check variable name"
> else
> # Return is always OK for rates !!
> exitstatus=${STATE_OK}
> echo "Rate $SEARCH returns:"
> echo "Last_1_Min = "$IPORTPAR1
> echo "Last_5_Min = "$IPORTPAR5
> echo "Last_15_Min = "$IPORTPAR15
> echo "| Last_1_min=$IPORTPAR1; Last_5_Min=$IPORTPAR5; Last_15_Min=$IPORTPAR15"
> fi
> ;;