Page 1 of 3

Oracle Database monitoring

Posted: Mon Nov 11, 2019 5:34 am
by spatil32
Hi,

I have Nagios Core 3.4 in our environment. A of now we are monitoring only standard OS parameters for Linux. Now there is a requirement to monitoring Oracle Database. So please let me know the steps to configure Oracle DB monitoring in Nagios core.
I can see default oracle plugin i.e check_oracle is present in /usr/local/nagios/libexec and I want use this default plugin only.
So what configuration steps I need to follow.
for e.g
1) what check_command to define in <oraserver>.cfg on Nagios server
2) Do I need to define any command in command.cfg file
3) How to define commands and threshold to define in nrpe.cfg file on Oracle server
4) Where to define ORACLE_HOME
5) Do I need to create any oracle user for Nagios and what rights it should have.

Please let me know on this as I am first time doing oracle DB monitoring in Nagios.
Thanks.

Regards
SagarP

Re: Oracle Database monitoring

Posted: Mon Nov 11, 2019 9:13 am
by satheesh19870819
Hello Sagar,

There are lot of plugins in exchange with which you can monitor anything and everything in oracle .

They have the steps to be done as well in most cases .

https://exchange.nagios.org/directory/P ... ses/Oracle

Re: Oracle Database monitoring

Posted: Mon Nov 11, 2019 3:00 pm
by mbellerue
Here is the help on the check_oracle plugin. It will help when defining a command.
https://nagios-plugins.org/doc/man/check_oracle.html

Here is a comprehensive list of object definitions for Nagios Core.
https://assets.nagios.com/downloads/nag ... tions.html

What you will need to do is configure a command that tells Nagios how to use the check_oracle plugin. There may already be an example command defined in your command configuration file (I know in Nagios Core 4 it's /usr/local/nagios/etc/objects/command.cfg, I don't know about 3). Once you have a command created, then you can use that command in your service definition.

So when reading the object definitions, pay particular attention to command definitions, and service definitions. Let us know if you get stuck at any specific point, and we will help you along.

Re: Oracle Database monitoring

Posted: Tue Nov 12, 2019 9:07 am
by spatil32
Thanks Satheesh and mbellerue for your reply.
I will go through the details provided and let you know the result.
Thanks.

SagarP

Re: Oracle Database monitoring

Posted: Tue Nov 12, 2019 4:38 pm
by mbellerue
Sounds good. We will keep this thread open, and wait to hear back.

Re: Oracle Database monitoring

Posted: Wed Nov 13, 2019 6:10 am
by spatil32
Hi,
Just a small query. Can we monitor Oracle DB installed on Windows platform using the same oracle plugin.
If not could you please provide details on how to monitor Oracle DB on windows.
Thanks.


Regards
SagarP

Re: Oracle Database monitoring

Posted: Wed Nov 13, 2019 6:18 am
by satheesh19870819
This plugin works irrespective of OS as they directly login to oracle DB not into OS .

Re: Oracle Database monitoring

Posted: Wed Nov 13, 2019 2:47 pm
by benjaminsmith
Hi @satheesh19870819. Thanks for contributing.

That's right, the plugin is for monitoring the database and is not dependent upon the operating system.

Let us know if you need anything else.

Re: Oracle Database monitoring

Posted: Thu Nov 21, 2019 9:51 am
by spatil32
Hi,
I managed to successfully configured oracle db on windows machine. But on Linux machine it is giving error as

NRPE: Command 'check_oracle_pmon' not defined

On Nagios server in remoteserver.cfg

define service{
use local-service
host_name remoteserver
service_description Oracle Status
check_command check_nrpe-n!check_oracle_pmon
}


On remote server Linux

In nrpe.cfg
command[check_oracle_pmon]=/usr/local/nagios/libexec/check_oracle --db SID

Status
[root@remoteserver etc]# /usr/local/nagios/libexec/check_oracle --db SID
SID OK - 17695 PMON process(es) running

Could you please help.
Thanks.

Regards
SagarP

Re: Oracle Database monitoring

Posted: Thu Nov 21, 2019 3:18 pm
by benjaminsmith
Hello @spatil32,

That looks right. Did you restart NRPE after making changes to the configuration file? If that doesn't work, please post nrpe.cfg to the thread for us to review.

Also, check the permissions on the plugin and make sure you an run it as the nagios user instead of root.