check_procs through nrpe gives wrong results

Phil Costelloe philc at foundation-it.com
Thu May 24 18:55:59 CEST 2007


The exact process string is appearing with the options you are giving to
ps. However Nagios may be using different options or even a binary it
builds itself.
 
You can find out by grepping PS_COMMAND in config.h in the plugins build
directory.
 
On Fedora Core 4, that gives:
#define PS_COMMAND "/bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm
args'"

On Solaris, it gives:
#define PS_COMMAND "/usr/local/nagios/libexec/pst3"
 
Phil

________________________________

From: M V Ajay (vMoksha) [mailto:Ajay.MV at UCB-Group.com] 
Sent: 24 May 2007 17:04
To: Phil Costelloe; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] check_procs through nrpe gives wrong results


Hi,
 
Exact process string is appearing in the ps output.
 
oracle    9882     1  0 May18 ?        00:01:40 ora_pmon_orcldb
 
Nagios: 2.7 on x86_64 (RHEL4)
Nagios plugins: 1.4.5
check_procs : (nagios-plugins 1.4.5) 1.54
NRPE: 2.6 (RHEL4)
 
Nagios server is on x86_64 and monitored server is an i386. And RPM
packages were built for the respective platforms.
Plugins were built as RPM packages on similar OS. Also there is only one
'ps' binary which is /bin/ps.
 
Regards,
Ajay

________________________________

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Phil
Costelloe
Sent: Thursday, May 24, 2007 5:40 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_procs through nrpe gives wrong results


That explains why the process you want to monitor is called
ora_pmon_orcldb but not why check_procs can't detect it. That's likely
to be down to that exact string not appearing in the ps output that
check_procs is using, maybe due to truncation.
 
Back to basics. What version of Nagios are you using? What version of
the plugins? What version of nrpe? How did you compile/install the
plugins that are on the remote server, specifically were they compiled
either on that server or on a server running the same OS?
 
--
Phil Costelloe
Foundation IT, Hermitage Berkshire RG18 9SE 

________________________________

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of M V
Ajay (vMoksha)
Sent: 24 May 2007 12:28
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_procs through nrpe gives wrong results


Hi,
 
I found the reason for the behaviour.
 
"Oracle have a process naming mechanism that enables you to distinguish
between multiple instances of the database. With Oracle, when you open
an instance, the $ORACLE_HOME/bin/oracle executable renames itself using
the UNIX environment variable ORACLE_SID for a given database. This
variable is used in generating Oracle process names:
ora_process_name_$ORACLE_SID."
 
So is there a away to monitor process (using the process name) as they
appear in 'ps -ef' output?
 
Regards,
Ajay


________________________________

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of M V
Ajay (vMoksha)
Sent: Wednesday, May 23, 2007 6:41 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check_procs through nrpe gives wrong results


Hi,
 
I am monitoring a Redhat enterprise Linux 4 server running oracle using
Nagios and NRPE.
 
When I monitor Oracle PMON process (ora_pmon_orcldb) on the server I get
the message that 'PROCS CRITICAL: 0 processes with command name
'ora_pmon_orcldb''.
I have confirmed that process 'ora_pmon_orcldb' is actually running on
the remote server. The same type of monitoring works for other processes
such as 'httpd'.
 
Nagios command definition:
 
define command {
        command_name nrpe_check_procs3
        command_line $USER1$/check_nrpe -n -H $HOSTADDRESS$ -c
check_procs3 -a $ARG1$ $ARG2$ $ARG3$
        }
 
NRPE configuration:
dont_blame_nrpe=1
command[check_procs3]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c
$ARG2$ -C $ARG3$
 
>From the command line I see the following message:
 
[nagios at nagiosserver ~]$ /usr/lib64/nagios/plugins/check_nrpe -H
oracleserver -n -c check_procs3 -a 1:4 1:8 ora_pmon_orcldb
PROCS CRITICAL: 0 processes with command name 'ora_pmon_orcldb'

 
Any idea what is wrong?
 
Thanks,
Ajay
 


________________________________

Legal Notice: This electronic mail and its attachments are intended
solely for the person(s) to whom they are addressed and contain
information which is confidential or otherwise protected from
disclosure, except for the purpose for which they are intended.
Dissemination, distribution, or reproduction by anyone other than the
intended recipients is prohibited and may be illegal. If you are not an
intended recipient, please immediately inform the sender and return the
electronic mail and its attachments and destroy any copies which may be
in your possession. UCB screens electronic mails for viruses but does
not warrant that this electronic mail is free of any viruses. UCB
accepts no liability for any damage caused by any virus transmitted by
this electronic mail. 
________________________________



________________________________

Legal Notice: This electronic mail and its attachments are intended
solely for the person(s) to whom they are addressed and contain
information which is confidential or otherwise protected from
disclosure, except for the purpose for which they are intended.
Dissemination, distribution, or reproduction by anyone other than the
intended recipients is prohibited and may be illegal. If you are not an
intended recipient, please immediately inform the sender and return the
electronic mail and its attachments and destroy any copies which may be
in your possession. UCB screens electronic mails for viruses but does
not warrant that this electronic mail is free of any viruses. UCB
accepts no liability for any damage caused by any virus transmitted by
this electronic mail. 
________________________________



________________________________

Legal Notice: This electronic mail and its attachments are intended
solely for the person(s) to whom they are addressed and contain
information which is confidential or otherwise protected from
disclosure, except for the purpose for which they are intended.
Dissemination, distribution, or reproduction by anyone other than the
intended recipients is prohibited and may be illegal. If you are not an
intended recipient, please immediately inform the sender and return the
electronic mail and its attachments and destroy any copies which may be
in your possession. UCB screens electronic mails for viruses but does
not warrant that this electronic mail is free of any viruses. UCB
accepts no liability for any damage caused by any virus transmitted by
this electronic mail. 
________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070524/66d36609/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list