Page 1 of 3

Memory utilization not showing in HP-UX through NRPE

Posted: Wed Oct 17, 2018 11:22 am
by progressive.nagiosXI
Hi Team,

PFA,
we installed and configured nrpe agent on HP-UX but not getting any value for Memory Utilization its showing blank

Note : we are getting values for File system and CPU

Please help!!
Thanks

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Wed Oct 17, 2018 12:09 pm
by npolovenko
Hello, @progressive.nagiosXI. Let's increase permissions for the check_memory.pl plugin on the remote NRPE server.
chmod 777 /usr/local/nagios/libexec/check_memory.pl
chmod u+x /usr/local/nagios/libexec/check_memory.pl
Then on the remote server sign in as nagios user and execute the plugin:
su - nagios
/usr/local/nagios/libexec/check_memory.pl

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Wed Oct 17, 2018 3:22 pm
by progressive.nagiosXI
Have tried this using the command with nagios user and given permission or 777.

As we can see nagios xi is running the command and also getting the actual state ( ok or critical ) its only missing the binary number.

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Wed Oct 17, 2018 3:47 pm
by ssax
The output from the nagios screenshot and the output from the command you ran (check_memory.pl) does not look like it's the same plugin, please attach the plugin that is used for the check_mem command in your nrpe.cfg file on the HP-UX server so that we can debug further.

Thank you

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Thu Oct 18, 2018 12:55 am
by progressive.nagiosXI
snapshots are different because we have tried two plugins,


The first plugin is check_mem ==> by running this we are getting the wrong output as its always showing this

[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.200.4.161 -t 30 -c check_mem -a ' -w 80 -c 90 '
OK - System Memory is at % |memory=;90;80;00;80

No Matter if the actual is in the warning state or critical and also not giving any number, but the plugin is running absolutely fine in command line

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Thu Oct 18, 2018 12:59 am
by progressive.nagiosXI

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Thu Oct 18, 2018 1:30 pm
by lmiltchev
How is "check_mem" command defined in nrpe.cfg on the remote box?

What is the output of the following command, run from the CLI on the HP-UX box?

Code: Select all

cat /etc/shells

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Tue Oct 23, 2018 11:45 pm
by progressive.nagiosXI
Hi Team,

Sorry for delay in response, please find attached NRPE>cfg file and we are not able to run command cat /etc/shells in HP-UX box.

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Wed Oct 24, 2018 11:25 am
by lmiltchev
The "check_mem" command is defined as such:

Code: Select all

command[check_mem]=/usr/local/nagios/libexec/check_mem $ARG1$
so, let's try to run the plugin locally (on the remote box), and check the output:

Code: Select all

/usr/local/nagios/libexec/check_mem -w 80 -c 90
Also, run the following commands on the remote machine and show the output:

Code: Select all

swapinfo -m
swapinfo -m | grep memory |  sed 's/'%'//' | awk '{ print $5 }'

Re: Memory utilization not showing in HP-UX through NRPE

Posted: Fri Oct 26, 2018 2:23 am
by progressive.nagiosXI
Hi Team,

Please find output

HSOLMANDEV:/usr/local/nagios/libexec #./check_mem -w 80 -c 90
OK - System Memory is at 10% |memory=10;90;80;00;80
HSOLMANDEV:/usr/local/nagios/libexec #

HSOLMANDEV:/usr/local/nagios/libexec #/usr/local/nagios/libexec/check_mem -w 80 -c 90
OK - System Memory is at 10% |memory=10;90;80;00;80
HSOLMANDEV:/usr/local/nagios/libexec #



output of

HSOLMANDEV:/usr/local/nagios/libexec #swapinfo -m | grep memory | sed 's/'%'//' | awk '{ print $5 }'
10



output of swapinfo

HSOLMANDEV:/usr/local/nagios/libexec #swapinfo -m
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 0 16384 0% 0 - 1 /dev/vg00/lvol2
reserve - 455 -455
memory 62330 6298 56032 10%