Nagios XI AIX RAM utilization

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI AIX RAM utilization

Post by Box293 »

Can you please attach the plugin.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nagarjuna
Posts: 133
Joined: Mon Dec 09, 2013 2:11 am

Re: Nagios XI AIX RAM utilization

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios XI AIX RAM utilization

Post by slansing »

Wait, which are you using? They both have a memory check in them.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI AIX RAM utilization

Post by Box293 »

Please attach/upload the modified plugin you are having issues with (the file itself, not in a code block).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nagarjuna
Posts: 133
Joined: Mon Dec 09, 2013 2:11 am

Re: Nagios XI AIX RAM utilization

Post by nagarjuna »

Dear Team,

Please check the attached file i am having issue with, i am not getting graphs with this default plugin.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios XI AIX RAM utilization

Post 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".
Former Nagios employee
nagarjuna
Posts: 133
Joined: Mon Dec 09, 2013 2:11 am

Re: Nagios XI AIX RAM utilization

Post 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:
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios XI AIX RAM utilization

Post 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.
You do not have the required permissions to view the files attached to this post.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios XI AIX RAM utilization

Post 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
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.
nagarjuna
Posts: 133
Joined: Mon Dec 09, 2013 2:11 am

Re: Nagios XI AIX RAM utilization

Post 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.
Locked