<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>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.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>You can find out by grepping PS_COMMAND in config.h in 
the plugins build directory.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>On Fedora Core 4, that gives:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>#define PS_COMMAND "/bin/ps axwo 'stat uid pid ppid vsz 
rss pcpu comm args'"<BR></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>On Solaris, it gives:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>#define PS_COMMAND 
"/usr/local/nagios/libexec/pst3"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=179424716-24052007>Phil</DIV></SPAN></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> M V Ajay (vMoksha) 
[mailto:Ajay.MV@UCB-Group.com] <BR><B>Sent:</B> 24 May 2007 17:04<BR><B>To:</B> 
Phil Costelloe; nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: 
[Nagios-users] check_procs through nrpe gives wrong results<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Exact process string is appearing in the ps 
output.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>oracle    9882     
1  0 May18 ?        00:01:40 
ora_pmon_orcldb</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Nagios: 2.7 on x86_64 (RHEL4)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Nagios plugins: 1.4.5</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>check_procs : (nagios-plugins 1.4.5) 
1.54</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>NRPE: 2.6 (RHEL4)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Nagios server is on x86_64 and monitored server is an i386. 
And RPM packages were built for the respective platforms.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Plugins were built as RPM packages on similar OS. Also 
there is only one 'ps' binary which is /bin/ps.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=931384715-24052007><FONT face=Arial 
color=#0000ff size=2>Ajay</DIV></FONT></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> nagios-users-bounces@lists.sourceforge.net 
[mailto:nagios-users-bounces@lists.sourceforge.net] <B>On Behalf Of </B>Phil 
Costelloe<BR><B>Sent:</B> Thursday, May 24, 2007 5:40 PM<BR><B>To:</B> 
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> Re: [Nagios-users] 
check_procs through nrpe gives wrong results<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=568343015-24052007>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.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=568343015-24052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=568343015-24052007>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?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=568343015-24052007><FONT size=2></FONT></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=568343015-24052007><FONT size=2>--<BR>Phil Costelloe<BR>Foundation IT, 
Hermitage Berkshire RG18 9SE </FONT></DIV></SPAN></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> nagios-users-bounces@lists.sourceforge.net 
[mailto:nagios-users-bounces@lists.sourceforge.net] <B>On Behalf Of </B>M V Ajay 
(vMoksha)<BR><B>Sent:</B> 24 May 2007 12:28<BR><B>To:</B> 
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> Re: [Nagios-users] 
check_procs through nrpe gives wrong results<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=871352511-24052007>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=871352511-24052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=871352511-24052007>I found the reason for the 
behaviour.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=871352511-24052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=+0><SPAN class=871352511-24052007>
<DIV dir=ltr align=left><SPAN class=338452510-24052007><FONT face=Arial 
color=#0000ff size=2><EM>"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."</EM></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=338452510-24052007><EM><FONT face=Arial 
color=#0000ff size=2></FONT></EM></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=338452510-24052007><SPAN 
class=871352511-24052007><FONT face=Arial color=#0000ff size=2>So is there a 
away to monitor process (using the process name) as they appear in 'ps -ef' 
output?</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=338452510-24052007><SPAN 
class=871352511-24052007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=338452510-24052007><SPAN 
class=871352511-24052007><FONT face=Arial color=#0000ff 
size=2>Regards,</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=338452510-24052007><SPAN 
class=871352511-24052007><FONT face=Arial color=#0000ff 
size=2>Ajay</FONT></SPAN></SPAN></DIV></SPAN></FONT></DIV><FONT face=Arial 
color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> nagios-users-bounces@lists.sourceforge.net 
[mailto:nagios-users-bounces@lists.sourceforge.net] <B>On Behalf Of </B>M V Ajay 
(vMoksha)<BR><B>Sent:</B> Wednesday, May 23, 2007 6:41 PM<BR><B>To:</B> 
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> [Nagios-users] check_procs 
through nrpe gives wrong results<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>I am monitoring a 
Redhat enterprise Linux 4 server running oracle using Nagios and 
NRPE.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>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''.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>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'.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>Nagios command 
definition:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>define command 
{<BR>        command_name 
nrpe_check_procs3<BR>        command_line 
$USER1$/check_nrpe -n -H $HOSTADDRESS$ -c check_procs3 -a $ARG1$ $ARG2$ 
$ARG3$<BR>        }</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>NRPE 
configuration:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007><SPAN 
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">dont_blame_nrpe=1</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007><SPAN 
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">command[check_procs3]=/usr/lib/nagios/plugins/check_procs 
-w $ARG1$ -c $ARG2$ -C $ARG3$</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007><SPAN 
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007><SPAN 
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">From the command 
line I see the following message:</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007><SPAN 
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier"></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007><SPAN 
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Courier">[nagios@nagiosserver 
~]$ /usr/lib64/nagios/plugins/check_nrpe -H oracleserver -n -c check_procs3 
-a 1:4 1:8 ora_pmon_orcldb<BR>PROCS CRITICAL: 0 processes with command name 
'ora_pmon_orcldb'<BR></SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=105512816-23052007>Any idea what is 
wrong?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007>Ajay</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=105512816-23052007></SPAN></FONT> </DIV><FONT face=Arial size=1><BR>
<HR>
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. 
<HR>
</FONT><FONT face=Arial size=1><BR>
<HR>
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. 
<HR>
</FONT><FONT face=Arial size=1><BR>
<HR>
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. 
<HR>
</FONT></BODY></HTML>