[Nagiosplug-help] {Disarmed} RE: {Disarmed} Re: {Disarmed} RE: {Disarmed} check_oracle plug in help

asam30 at gmail.com asam30 at gmail.com
Wed May 14 14:18:28 CEST 2008


Duncan,

I will be logging into the linux box where nagios servier is installed (also
oracle 10g client installed) and executing the following command as nagios
user,

[nagios at lnxtestsrv1 libexec]$ /home/nagios/nagios/libexec/check_nrpe -H
10.192.2.239 -p 5666 -c check_tns
No TNS Listener on playdb1

nrpe.cfg file on oracle server has this,

command[check_tns]=/usr/local/nagios/libexec/check_oracle --tns playdb1


[nagios at lnxtestsrv1 libexec]$ /home/nagios/nagios/libexec/check_nrpe -H
10.192.2.239 -p 5666 -c check_login
CRITICAL -

nrpe.cfg has,

command[check_login]=/usr/local/nagios/libexec/check_oracle --login playdb1

[nagios at lnxtestsrv1 libexec]$ /home/nagios/nagios/libexec/check_nrpe -H
10.192.2.239 -p 5666 -c check_sid
playdb1 OK - 1 PMON process(es) running

nrpe.cfg has,

command[check_sid]=/usr/local/nagios/libexec/check_oracle --db playdb1

[nagios at lnxtestsrv1 libexec]$ /home/nagios/nagios/libexec/check_nrpe -H
10.192.2.239 -p 5666 -c check_cache
playdb1 OK - Cache Hit Rates: % Lib -- % Buff|lib=%;90;80;0;100
buffer=%;90;80;0;100

this isn't showing the correct values or better say it won't show any value,
but same command on 239 machine where oracle server is running shows,

[nagios at oradb-lnx libexec]$ /usr/local/nagios/libexec/check_oracle --cache
playdb1 monitor monitor 80 90
playdb1 OK - Cache Hit Rates: 97.92% Lib -- 99.35%
Buff|lib=97.92%;90;80;0;100 buffer=99.35%;90;80;0;100

and same with the tablespace command

[nagios at lnxtestsrv1 libexec]$ /home/nagios/nagios/libexec/check_nrpe -H
10.192.2.239 -p 5666 -c check_tablespace
playdb1 : USERS OK - % used [  /  MB available ]|USERS=%;80;90;0;100

but this works,

[nagios at oradb-lnx libexec]$ /usr/local/nagios/libexec/check_oracle
--tablespace playdb1 monitor monitor USERS 90 80
playdb1 : USERS OK - 10.00% used [ 4 / 5 MB available
]|USERS=10.00%;80;90;0;100

I don't know how to fix this, I've tried all possible steps given by many
people and I last came here..

Please some one help me


thanks







On Wed, May 14, 2008 at 4:29 PM, Duncan Berriman <duncan at dcl.co.uk> wrote:

>  The command should now be correct.
>
> When you run it locally are you logged in as the nagios user that NRPE usesor as say root?
> If not su to the account and try running it again.
>
> I would guess its either a privilege problem which you can fix with visudo
> to allow NRPE access to the appropriate program or as you mention an envir
> onment issue.
>
> I am guessing the account you are using for the command line test is set up
> for oracle and the nagios user that nrpe uses isn't.
>
> Duncan
>
>
>  -----Original Message-----
> *From:* asam30 at gmail.com [mailto:asam30 at gmail.com]
> *Sent:* 14 May 2008 10:03
> *To:* Duncan Berriman
> *Subject:* {Disarmed} Re: {Disarmed} RE: {Disarmed} [Nagiosplug-help]
> check_oracle plug in help
>
> Duncan,
>
> Thanks for the quick reply,
>
> On the *oradb-lnx* box where oracle db is running, I tried,
>
> [nagios at oradb-lnx libexec]$ /usr/local/nagios/libexec/check_oracle --tns
> oradb-lnx
> OK - reply time 10 msec from oradb-lnx
> [nagios at oradb-lnx libexec]$ /usr/local/nagios/libexec/check_oracle --tns
> playdb1
> OK - reply time 10 msec from playdb1
> [nagios at oradb-lnx libexec]$
>
> both seems to be working. As per your suggestion, I have changed to
>
> command[check_tns]=/usr/local/nagios/libexec/check_oracle --tns playdb1
>
> in nrpe.cfg.
>
> But it still shows the same error.
>
> [nagios at lnxtestsrv1 libexec]$ ./check_nrpe -H *MailScanner has detected a
> possible fraud attempt from "10.192.2.239" claiming to be* *MailScanner
> warning: numerical links are often malicious:* 10.192.2.239<http://10.192.2.239>-p 5666 -c check_tns
> No TNS Listener on playdb1
>
> Do you think I should change something in the check_oracle script (like
> adding ORACLE_HOME path there)?
>
> Any suggestions,
>
> Thanks
>
>
>
>
> On Wed, May 14, 2008 at 1:58 PM, Duncan Berriman <duncan at dcl.co.uk> wrote:
>
>>  You appear to be running different commands....
>>
>> command[check_tns]=/usr/local/nagios/libexec/check_oracle --tns oradb-lnx
>> command[check_login]=/usr/local/nagios/libexec/check_oracle --login
>> playdb1
>>
>> but all commands works if I execute following from 239 machine (oradb-lnx)
>>
>> [nagios at oradb-lnx libexec]$ ./check_oracle --tns playdb1
>> OK - reply time 10 msec from playdb1
>> [nagios at oradb-lnx libexec]$ ./check_oracle --login playdb1
>> OK - dummy login connected
>>
>> Surely it should be....
>>
>> command[check_tns]=/usr/local/nagios/libexec/check_oracle --tns playdb1
>>
>> not
>>
>> command[check_tns]=/usr/local/nagios/libexec/check_oracle --tns oradb-lnx
>>
>> Duncan
>>
>>
>>  -----Original Message-----
>> *From:* nagiosplug-help-bounces at lists.sourceforge.net [mailto:
>> nagiosplug-help-bounces at lists.sourceforge.net] *On Behalf Of *
>> asam30 at gmail.com
>> *Sent:* 14 May 2008 08:39
>> *To:* nagiosplug-help at lists.sourceforge.net
>> *Subject:* {Disarmed} [Nagiosplug-help] check_oracle plug in help
>>
>> Hi,
>>
>> I am using check_oracle plug in to monitor some of the oracle database
>> parameters. But this is reporting the following error.
>>
>> [nagios at lnxtestsrv1 libexec]$ ./check_nrpe -H *MailScanner has detected a
>> possible fraud attempt from "10.192.2.239" claiming to be* *MailScanner
>> warning: numerical links are often malicious:* 10.192.2.239<http://10.192.2.239>-p 5666 -c check_tns
>> No TNS Listener on playdb1
>>
>> Let me explain,
>>
>> lnxtestsrv1 is a box where nagios server is running and this is monitoring
>> checks(check_http, check_ftp, check_disk, check_swap etc) of other machines
>> just fine. I now need to monitor oracle db on *MailScanner has detected a
>> possible fraud attempt from "10.192.2.239" claiming to be* *MailScanner
>> warning: numerical links are often malicious:* 10.192.2.239<http://10.192.2.239>machine where oracle server is running and sid is playdb1. i installed
>> oracle client on this lnxtestsrv1 machine and user nagios has access to
>> sqlplus and tnsping commands I also add nagios to the oracle group (dba,
>> oinstall). tnsping from nagios user works fine. telnet to 239 on port 1521
>> works ok
>>
>> when I execute this command on the machine where nagios server is running,
>>
>> [nagios at lnxtestsrv1 libexec]$ ./check_nrpe -H *MailScanner has detected a
>> possible fraud attempt from "10.192.2.239" claiming to be* *MailScanner
>> warning: numerical links are often malicious:* 10.192.2.239<http://10.192.2.239>-p 5666 -c check_tns
>> No TNS Listener on playdb1
>>
>>
>> and
>>
>> [nagios at lnxtestsrv1 libexec]$ ./check_nrpe -H *MailScanner has detected a
>> possible fraud attempt from "10.192.2.239" claiming to be* *MailScanner
>> warning: numerical links are often malicious:* 10.192.2.239<http://10.192.2.239>-p 5666 -c check_login
>> CRITICAL -
>>
>> in my 239 machine nrpe.cfg has following,
>>
>> command[check_tns]=/usr/local/nagios/libexec/check_oracle --tns oradb-lnx
>> command[check_login]=/usr/local/nagios/libexec/check_oracle --login
>> playdb1
>>
>> but all commands works if I execute following from 239 machine (oradb-lnx)
>>
>> [nagios at oradb-lnx libexec]$ ./check_oracle --tns playdb1
>> OK - reply time 10 msec from playdb1
>> [nagios at oradb-lnx libexec]$ ./check_oracle --login playdb1
>> OK - dummy login connected
>>
>>
>> I did set the ORACLE_HOME path to where oracle client installed on
>> lnxtestsrv1 machine. Please help me how to fix this.
>>
>> Thanks
>> -Shankar
>>
>>
>>
>>
>> --
>> Shankar Asam
>> --
>> This message has been scanned for viruses and
>> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
>>
>> believed to be clean.
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
>>
>> believed to be clean.
>
>
>
>
> --
> Shankar Asam
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.




-- 
Shankar Asam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20080514/71fd1471/attachment.html>


More information about the Help mailing list