How to configure Commands and Services for this Oracle plug

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

How to configure Commands and Services for this Oracle plug

Post by dlukinski »

Hello XI Support

How to configure Commands and services for this Oracle plugin?
https://exchange.nagios.org/directory/P ... 29/details

Tried this way:
Command: $USER1$/check_ora_db $ARG1$

Service: check_ora_db!--action=dbstatus --service=KCTCQA.mydomain.com --oh=/usr/lib/oracle/11.2/client64 --dbuser=nagiosxi --dbpass=mypwd --port=1532 --host=$HOSTADDRESS$!!!!!!!

- no luck
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to configure Commands and Services for this Oracle p

Post by tmcdonald »

Can you please provide a bit more information? What error messages are you receiving? Are you running this on the Nagios server or the remote machine through NRPE?
Former Nagios employee
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How to configure Commands and Services for this Oracle p

Post by rkennedy »

Also, did you follow the instructions? It looks like the plugin requires an additional package -

Code: Select all

1. install 10g (or above) oracle client (script uses EZ connect to establish database connection); this client is to be used by check_ora_db script 
Following that, it appears to just use NRPE, I don't think you'll need to define a command on the Nagios side. You should be able to just use the standard check_nrpe, to trigger the script on the client side. See the below for the definitions that can be added to your nrpe configuration.

Code: Select all

command[check_WHATEVER_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=statusOK
command[check_dbstatus_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=dbstatus --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lsnrstatus_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lsnrstatus --service=[SID|SERVICE] --oh=[ORACLE_HOME] --lsnrports=[dbhost]:[dbport_1],[dbhost]:[dbport_2]
command[check_sessionlimit_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=sessionlimit --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=85 --critical=95 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_alertlogerror_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=alertlogerror --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_alertlogerror_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=alertlogerror --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --alertlogerrlist=ORA-04045:1::4,ORA-04098::1:4,ORA-27:::24
command[check_laststats_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=laststats --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=7 --critical=14 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --statsTarget=auto_job
command[check_laststats_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=laststats --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=7 --critical=14 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --statsTarget=DBA_TAB_STATS_HISTORY
command[check_laststats_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=laststats --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=7 --critical=14 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --statsTarget=USER1,USER2
command[check_lastArchBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastArchBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=8 --critical=24 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastFullBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastFullBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=33 --critical=36 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastIncrBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastIncrBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=1.5 --critical=2 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastExpBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastExpBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=1 --critical=3 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastColdBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastColdBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=1 --critical=3 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_logstbyLag_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=logstbyLag --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=60 --critical=180 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_logstbyGap_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=logstbyGap --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_phystbyLag_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=phystbyLag --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=60 --critical=180 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_phystbyGap_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=phystbyGap --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] 
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: How to configure Commands and Services for this Oracle p

Post by dlukinski »

rkennedy wrote:Also, did you follow the instructions? It looks like the plugin requires an additional package -

Code: Select all

1. install 10g (or above) oracle client (script uses EZ connect to establish database connection); this client is to be used by check_ora_db script 
Following that, it appears to just use NRPE, I don't think you'll need to define a command on the Nagios side. You should be able to just use the standard check_nrpe, to trigger the script on the client side. See the below for the definitions that can be added to your nrpe configuration.

Code: Select all

command[check_WHATEVER_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=statusOK
command[check_dbstatus_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=dbstatus --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lsnrstatus_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lsnrstatus --service=[SID|SERVICE] --oh=[ORACLE_HOME] --lsnrports=[dbhost]:[dbport_1],[dbhost]:[dbport_2]
command[check_sessionlimit_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=sessionlimit --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=85 --critical=95 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_alertlogerror_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=alertlogerror --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_alertlogerror_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=alertlogerror --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --alertlogerrlist=ORA-04045:1::4,ORA-04098::1:4,ORA-27:::24
command[check_laststats_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=laststats --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=7 --critical=14 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --statsTarget=auto_job
command[check_laststats_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=laststats --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=7 --critical=14 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --statsTarget=DBA_TAB_STATS_HISTORY
command[check_laststats_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=laststats --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=7 --critical=14 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] --statsTarget=USER1,USER2
command[check_lastArchBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastArchBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=8 --critical=24 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastFullBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastFullBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=33 --critical=36 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastIncrBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastIncrBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=1.5 --critical=2 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastExpBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastExpBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=1 --critical=3 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_lastColdBackup_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=lastColdBackup --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=1 --critical=3 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_logstbyLag_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=logstbyLag --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=60 --critical=180 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_logstbyGap_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=logstbyGap --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_phystbyLag_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=phystbyLag --service=[SID|SERVICE] --oh=[ORACLE_HOME] --warning=60 --critical=180 --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost]
command[check_phystbyGap_SID]=/usr/lib64/nagios/plugins/check_ora_db --action=phystbyGap --service=[SID|SERVICE] --oh=[ORACLE_HOME] --dbuser=nagios --dbpass=[nagiospass] --port=[dbport] --host=[dbhost] 

Thank you (not enough expirience on my side to figure), please keep it open until we install and configure NRPE
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: How to configure Commands and Services for this Oracle p

Post by hsmith »

Will do.
Former Nagios Employee.
me.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: How to configure Commands and Services for this Oracle p

Post by dlukinski »

hsmith wrote:Will do.

Please close this one.
Thank you
Locked