Page 2 of 4

Re: Nagios XI AIX RAM utilization

Posted: Thu Aug 21, 2014 10:46 pm
by Box293
Can you please attach the plugin.

Re: Nagios XI AIX RAM utilization

Posted: Fri Aug 22, 2014 12:24 pm
by nagarjuna
Dear Team,

Please check the attached aix_ram_plugin, its coming by default with following plugins name:

First download the pre-compiled Nagios plugin binaries for AIX 5.3 from the following URL:

http://exchange.nagios.org/hostedfiles/ ... lugins.tgz

Next download the pre-compiled NRPE binaries from the following URL:

http://assets.nagios.com\downloads\nagiosxi\agents\AIX-5.3-nrpe-2.12-binaries.tar.gz

Re: Nagios XI AIX RAM utilization

Posted: Fri Aug 22, 2014 3:04 pm
by slansing
Wait, which are you using? They both have a memory check in them.

Re: Nagios XI AIX RAM utilization

Posted: Sun Aug 24, 2014 9:56 pm
by Box293
Please attach/upload the modified plugin you are having issues with (the file itself, not in a code block).

Re: Nagios XI AIX RAM utilization

Posted: Mon Aug 25, 2014 3:56 am
by nagarjuna
Dear Team,

Please check the attached file i am having issue with, i am not getting graphs with this default plugin.

Re: Nagios XI AIX RAM utilization

Posted: Mon Aug 25, 2014 9:30 am
by tmcdonald
nagarjuna, you still have not attached a plugin to your post. You will need to click "Upload Attachment" when creating your response, and then browse to the plugin and click "Add the file".

Re: Nagios XI AIX RAM utilization

Posted: Tue Aug 26, 2014 12:11 pm
by nagarjuna
Sorry tmcdonald,

Due to file extension it was not uploaded, please check now check_aix_ram which we are using in AIX system. Please check once :oops:

Re: Nagios XI AIX RAM utilization

Posted: Tue Aug 26, 2014 5:00 pm
by sreinhardt
Well this is a completely different plugin than you initially posted in code\quote blocks, but I have attached a modified version that should output perfdata.

Re: Nagios XI AIX RAM utilization

Posted: Tue Aug 26, 2014 5:03 pm
by abrist
I think the big issue here is that bash cannot do floats (without awk/bc help), and the following command (from the script) that I had you run loads a float into the $RAMUSAGE var:

Code: Select all

svmon | grep memory | awk '{print ($3/$2)*100}'
87.0785
You will need to truncate the decimal and everything afterwards with:

Code: Select all

int=${float%.*}
(substituting "RAMUSAGE" for "int" and "float")
See the final script below:

Code: Select all

#!/bin/sh
#
# check aix ram usage
#
[ $# -ne 2 ] && echo "usage: $0 <warn> <crit>" && exit 3

WARN=$1
CRIT=$2

RAMUSAGE=`svmon | grep memory | awk '{ print ($3/$2)*100 }'`
RAMUSAGE=${RAMUSAGE%.*}
if [ ${RAMUSAGE} -ge ${WARN} ] && [ ${RAMUSAGE} -lt ${CRIT} ]; then

	echo "WARN - RAM usage is at ${RAMUSAGE}%"
	exit 1;

elif [ ${RAMUSAGE} -ge ${CRIT} ]; then

	echo "CRIT - RAM usage is at ${RAMUSAGE}%"
	exit 2;

elif [ ${RAMUSAGE} -lt ${WARN} ]; then

	echo "OK - RAM usage is at ${RAMUSAGE}%"
	exit 0;

else

	echo "UNKNOWN - RAM usage"
	exit 3;

fi

Re: Nagios XI AIX RAM utilization

Posted: Wed Aug 27, 2014 4:20 am
by nagarjuna
Thanks abrist,

Please let me know one more thing, we need this plugin output without adding cache memory.

we need RAM utilization which is used by system without cache memory.

Please help me to achieve this with this check_aix_ram plugin or any other one.