Page 1 of 2
check_oracle_health does not work as provided
Posted: Wed Apr 06, 2016 3:10 pm
by dlukinski
Hello XI Support
We attempted configuring our XI according to the manual attached.
Selected 8 different checks all producing same Message "Copyright (c) 2008 Gerhard Lausser":
-------------------------------------------------------------------------------
Copyright (c) 2008 Gerhard Lausser
Check various parameters of Oracle databases
Usage:
check_oracle_health [-v] [-t ] --connect=
--username= --password= --mode=
--tablespace=
check_oracle_health [-h
------------------------------------------------------------------------------
Here is a command line:
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health --connect=$HOSTADDRESS$:$ARG1$/$ARG2$ --username=$ARG3$ --password=$ARG4$ --mode=$ARG5$ $ARG6$
- tried with and without '=' (no change)
- DB argument we've also tried as short name or as FQDN per our ORA file (no change)
- ARG6 if exists moved from line 5 to line 6 (no change)
Please help to figure how we could run this command and services?
Re: check_oracle_health does not work as provided
Posted: Wed Apr 06, 2016 3:50 pm
by tgriep
Can you post how the service check is defined so we can review it?
Can you run the check from the command line without any errors?
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 1:05 pm
by dlukinski
tgriep wrote:Can you post how the service check is defined so we can review it?
Can you run the check from the command line without any errors?
- cannot run from command line
[nagios@nagxiprod02 ~]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health connect=10.102.35.237:1532/KCTCQA.konecranes.com --username=nagiosxi password=KsaXer3587 mode=rman-backup-problems --warning 1 --critical 2
/usr/bin/env: $/check_oracle_health: No such file or directory
[nagios@nagxiprod02 ~]$
- Service file is down below (does not look right VS GUI config / last 2 ARG are missing for all checks (ARG5 cut after first "-" in Oracle command)
Custom-Server-ORACLE-KCTCQA.cfg [----] 0 L:[ 1+ 0 1/111] *(0 /3787b) 0035 0x023
Code: Select all
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:> 2016-04-06 20:16:44
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---.
# Nagios CCM will overwrite all manual settings during the next update if you.
# would like to edit files manually, place them in the 'static' directory or.
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - Backup problems multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!rman-.
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - Connected Users multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!connec
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
login as: root
[email protected]'s password:
Last login: Thu Apr 7 12:28:19 2016 from 8cg50903k0.res.kcg.global
[root@fikc-nagxidev01 ~]# mc
Custom-Server-ORACLE-KCTCQA.cfg [----] 0 L:[ 38+41 79/111] *(2821/3787b) 0009 0x009
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - Corrupted blocks multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!corrup
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - Data File IO multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!datafi
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - Data Files existing multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!datafi
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
login as: root
[email protected]'s password:
Last login: Thu Apr 7 12:28:19 2016 from 8cg50903k0.res.kcg.global
[root@fikc-nagxidev01 ~]# mc
Custom-Server-ORACLE-KCTCQA.cfg [----] 0 L:[ 70+41 111/111] *(3787/3787b) <EOF>
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - List Events multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!list.-
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - List tablespaces multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!list-.
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
define service {
<------>host_name<-----><------><------>fihp-oradev06.konecranes.com
<------>service_description<---><------>CUSTOM - Tablespaces Usage multihost
<------>use<---><------><------><------>st_ORACLE_DB
<------>servicegroups<-><------><------>ORACLEtest
<------>check_command<-><------><------>check_oracle_health!1532!KCTCQA.konecranes.com!nagiosxi!KsaXer3587!tables
<------>contact_groups<><------><------>ORACLEtest
<------>_xiwizard<-----><------><------>oracleserverspace
<------>register<------><------><------>1
<------>}<----->
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 3:05 pm
by tgriep
Try running the command like below. It was missing the path to the check and I added single quotes around the connect option.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect='10.102.35.237:1532/KCTCQA.konecranes.com' --username=nagiosxi --password=KsaXer3587 --mode=rman-backup-problems --warning 1 --critical 2
Verify that the information is correct and let us know if it works.
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 3:07 pm
by dlukinski
tgriep wrote:Try running the command like below. It was missing the path to the check and I added single quotes around the connect option.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect='10.102.35.237:1532/KCTCQA.konecranes.com' --username=nagiosxi --password=KsaXer3587 --mode=rman-backup-problems --warning 1 --critical 2
Verify that the information is correct and let us know if it works.
It worked from CLI (thank you)
- what is wrong with GUI Service?
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 3:43 pm
by rkennedy
Can you post a screenshot and show what all of your $ARG#$ values are set to for this service?
I'm not seeing much difference, but it really depends on what those are set to.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health --connect=$HOSTADDRESS$:$ARG1$/$ARG2$ --username=$ARG3$ --password=$ARG4$ --mode=$ARG5$ $ARG6$
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect='10.102.35.237:1532/KCTCQA.konecranes.com' --username=nagiosxi --password=KsaXer3587 --mode=rman-backup-problems --warning 1 --critical 2
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 3:47 pm
by dlukinski
rkennedy wrote:Can you post a screenshot and show what all of your $ARG#$ values are set to for this service?
I'm not seeing much difference, but it really depends on what those are set to.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health --connect=$HOSTADDRESS$:$ARG1$/$ARG2$ --username=$ARG3$ --password=$ARG4$ --mode=$ARG5$ $ARG6$
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect='10.102.35.237:1532/KCTCQA.konecranes.com' --username=nagiosxi --password=KsaXer3587 --mode=rman-backup-problems --warning 1 --critical 2
Here is a screenshot
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 3:53 pm
by rkennedy
Try putting a ' after --connect= and then again after $ARG2$. That's the only difference I'm seeing at a quick glance.
Code: Select all
--connect='$HOSTADDRESS$:$ARG1$/$ARG2$'
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 3:58 pm
by dlukinski
rkennedy wrote:Try putting a ' after --connect= and then again after $ARG2$. That's the only difference I'm seeing at a quick glance.
Code: Select all
--connect='$HOSTADDRESS$:$ARG1$/$ARG2$'
No luck (wonder why service file shows incomplete ARG5 and no ARG6?)
Re: check_oracle_health does not work as provided
Posted: Thu Apr 07, 2016 4:21 pm
by rkennedy
Where are you seeing an incomplete $ARG5$ and $ARG6$?