Page 1 of 1

Nagios alert for memory utulization on HPUX

Posted: Wed May 29, 2013 12:49 am
by skumar7466
HI!

I would like to monitor memory utilization of hpux servers. but not working..

config of nrpe.cfg,

command[check_mem]=/opt/nrpe/libexec/check_memlin -w 10 -c 5

Declare definition in nagios server as

define service{
use linux-services
hostgroup_name hpux-server-uat
service_description Memory Utilization
check_command check_nrpe!check_memlin
contact_groups unix
notification_interval 0
}

And declare command.cfg as

define command{
command_name check_memlin
command_line $USER1$/check_memlin -w 20 -c 10
}

But, getting error in nagios as NRPE: Command 'check_memlin' not defined

Kindly help me to resolve this issue...

Re: Nagios alert for memory utulization on HPUX

Posted: Wed May 29, 2013 10:49 am
by slansing
It looks like you don't have that command defined on the HPUX server in the nrpe.cfg, you will need to do this first, then you should be able to call it fine.

Re: Nagios alert for memory utulization on HPUX

Posted: Wed May 29, 2013 10:59 pm
by skumar7466
I defined as

command[check_mem]=/opt/nrpe/libexec/check_memlin -w 10 -c 5

In hpux server, but this check_memlin is for Linux, so yesterday i downloaded check_memhpux plugin for hpux.

changed the command line as

command[check_memhpux]=/opt/nrpe/libexec/check_memhpux -u -w 80 -c 90

Now if i am running from the HPUX server (nrpe client) , its working as below.

-bash-3.2# /opt/nrpe/libexec/check_memhpux -u -w 80 -c 90
Memory OK - 13.0% (4121312 kB) used

If i am running from Nagios server as follows, getting error as unable to read output.

root@Ubuntu-repo:/usr/local/nagios/etc/objects# /usr/local/nagios/libexec/check_nrpe -H 10.1.10.51 -c check_memhpux
NRPE: Unable to read output

Re: Nagios alert for memory utulization on HPUX

Posted: Thu May 30, 2013 1:12 pm
by abrist
Try checking it locally from the remote host's cli as user "nagios". Have you taken a look at the common solutions document for nrpe?
http://assets.nagios.com/downloads/nagi ... utions.pdf

Re: Nagios alert for memory utulization on HPUX

Posted: Fri May 31, 2013 12:23 am
by skumar7466
I couldnt find the issue with the document...

Re: Nagios alert for memory utulization on HPUX

Posted: Fri May 31, 2013 9:51 am
by abrist
skumar7466 wrote:I couldnt find the issue with the document...

Getting error as Cannot determine ORACLE_HOME for sid GESS from nagios server..
You are getting this error message from the nrpe memory check?

Re: Nagios alert for memory utulization on HPUX

Posted: Mon Jun 03, 2013 12:54 am
by skumar7466
Not from the HPUX server end...Locally it is working..


If i am running from Nagios server as follows using check_nrpe, getting error as unable to read output.

root@Ubuntu-repo:/usr/local/nagios/etc/objects# /usr/local/nagios/libexec/check_nrpe -H 10.1.10.51 -c check_memhpux
NRPE: Unable to read output

Re: Nagios alert for memory utulization on HPUX

Posted: Mon Jun 03, 2013 11:18 am
by slansing
Does nagios have permissions to run your plugins on the HPUX server?

Re: Nagios alert for memory utulization on HPUX

Posted: Mon Jun 03, 2013 11:25 pm
by skumar7466
Yes. I switched to nagios and it worked...But not from Nagios server.

Re: Nagios alert for memory utulization on HPUX

Posted: Tue Jun 04, 2013 3:46 pm
by sreinhardt
Just to be 100% certain, have you su-ed to the nagios user and run the plugin? If you are running as root, nagios may not have permission to read the proper files.