Issues installing Oracle plugin in NagiosXI
Re: Issues installing Oracle plugin in NagiosXI
1526 is the correct port now.
# nmap 10.101.31.105 -p 1526
Starting Nmap 6.47 ( http://nmap.org ) at 2016-04-11 17:05 EDT
Nmap scan report for sbldev.bose.com (10.101.31.105)
Host is up (0.0014s latency).
PORT STATE SERVICE
1526/tcp open pdap-np
Nmap done: 1 IP address (1 host up) scanned in 0.31 seconds
# nmap 10.101.31.105 -p 1526
Starting Nmap 6.47 ( http://nmap.org ) at 2016-04-11 17:05 EDT
Nmap scan report for sbldev.bose.com (10.101.31.105)
Host is up (0.0014s latency).
PORT STATE SERVICE
1526/tcp open pdap-np
Nmap done: 1 IP address (1 host up) scanned in 0.31 seconds
Re: Issues installing Oracle plugin in NagiosXI
Hm, what is the result if you run the check with an IP instead of a hostname?
What are your environment variables for Oracle_Home set to?
What are your environment variables for Oracle_Home set to?
Former Nagios Employee
Re: Issues installing Oracle plugin in NagiosXI
# nmap sbldev.bose.com -p 1526
Starting Nmap 6.47 ( http://nmap.org ) at 2016-04-11 17:46 EDT
Nmap scan report for sbldev.bose.com (10.101.31.105)
Host is up (0.00093s latency).
PORT STATE SERVICE
1526/tcp open pdap-np
Nmap done: 1 IP address (1 host up) scanned in 1.67 seconds
Below the environment for oracle plugin on my nagios server
export ORACLE_HOME=/usr/lib/oracle/12.1/client64/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib/
export PATH=$PATH:/usr/lib/oracle/12.1/client64/bin
export TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin
Starting Nmap 6.47 ( http://nmap.org ) at 2016-04-11 17:46 EDT
Nmap scan report for sbldev.bose.com (10.101.31.105)
Host is up (0.00093s latency).
PORT STATE SERVICE
1526/tcp open pdap-np
Nmap done: 1 IP address (1 host up) scanned in 1.67 seconds
Below the environment for oracle plugin on my nagios server
export ORACLE_HOME=/usr/lib/oracle/12.1/client64/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib/
export PATH=$PATH:/usr/lib/oracle/12.1/client64/bin
export TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin
Re: Issues installing Oracle plugin in NagiosXI
Take a look in the the folder that the TNS_ADMIN environment variable it pointing to
You may have to edit the tnsnames.ora file, it it exists, to add your server, SID, etc...
Code: Select all
/usr/lib/oracle/12.1/client64/network/adminBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Issues installing Oracle plugin in NagiosXI
tnsnames.ora file already exist and the entries are correct
root@nagmonusdev1:(04-12 09:57): /usr/lib/oracle/12.1/client64/network/admin
# cat tnsnames.ora
sblqa1.bose.com=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sbldev)(PORT = 1526))
)
(CONNECT_DATA =
(SID = SBLQA1)
(SERVER = DEDICATED)
)
)
If the entries were incorrect, i will not be able to do tnsping. But that's not the case here.
root@nagmonusdev1:(04-12 09:57): /usr/local/nagios/libexec
# ./check_oracle_health --connect sblqa1.bose.com --mode tnsping
OK - connection established to sblqa1.bose.com.
root@nagmonusdev1:(04-12 09:57): /usr/lib/oracle/12.1/client64/network/admin
# cat tnsnames.ora
sblqa1.bose.com=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sbldev)(PORT = 1526))
)
(CONNECT_DATA =
(SID = SBLQA1)
(SERVER = DEDICATED)
)
)
If the entries were incorrect, i will not be able to do tnsping. But that's not the case here.
root@nagmonusdev1:(04-12 09:57): /usr/local/nagios/libexec
# ./check_oracle_health --connect sblqa1.bose.com --mode tnsping
OK - connection established to sblqa1.bose.com.
Re: Issues installing Oracle plugin in NagiosXI
Try running the command like the example below. Make sure you leave the single / double quotes intact and see if that works for you.
If it still doesn't work, you may have to login to your Oracle server and see what type of error it is reporting.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'sblqa1.bose.com:1526/SBLQA1' --username 'oracleuser' --password 'oraclepass' --mode sql --name="select count(*) from S_ESCL_REQ"Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Issues installing Oracle plugin in NagiosXI
I also tried putting the TNS_ADMIN variable but still no go
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'sblqa1.bose.com:1526/SBLQA1' --username 'nagios' --password 'nagios' --mode sql --name="select count(*) from S_ESCL_REQ"
CRITICAL - cannot connect to sblqa1.bose.com:1526/SBLQA1. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin /usr/local/nagios/libexec/check_oracle_health --connect 'sblqa1.bose.com:1526/SBLQA1' --username 'nagios' --password 'nagios' --mode sql --name="select count(*) from S_ESCL_REQ"
CRITICAL - cannot connect to sblqa1.bose.com:1526/SBLQA1. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'sblqa1.bose.com:1526/SBLQA1' --username 'nagios' --password 'nagios' --mode sql --name="select count(*) from S_ESCL_REQ"
CRITICAL - cannot connect to sblqa1.bose.com:1526/SBLQA1. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin /usr/local/nagios/libexec/check_oracle_health --connect 'sblqa1.bose.com:1526/SBLQA1' --username 'nagios' --password 'nagios' --mode sql --name="select count(*) from S_ESCL_REQ"
CRITICAL - cannot connect to sblqa1.bose.com:1526/SBLQA1. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
Re: Issues installing Oracle plugin in NagiosXI
I may be wrong but I believe you need to have the following line in the tnsnames.ora file:CRITICAL - cannot connect to sblqa1.bose.com:1526/SBLQA1. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
Code: Select all
(SERVICE_NAME = SBLQA1)http://www.orafaq.com/wiki/Tnsnames.ora<addressname> =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = <hostname>)(Port = <port>))
)
(CONNECT_DATA =
(SERVICE_NAME = <service_name>)
)
)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Issues installing Oracle plugin in NagiosXI
# cat /usr/lib/oracle/12.1/client64/network/admin/tnsnames.ora
sblqa1.bose.com=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sbldev)(PORT = 1526))
)
(CONNECT_DATA =
(SERVICE_NAME = SBLQA1)
(SID = SBLQA1)
(SERVER = DEDICATED)
)
)
Still getting same error. Please escalate this to higher priority.
sblqa1.bose.com=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sbldev)(PORT = 1526))
)
(CONNECT_DATA =
(SERVICE_NAME = SBLQA1)
(SID = SBLQA1)
(SERVER = DEDICATED)
)
)
Still getting same error. Please escalate this to higher priority.
Re: Issues installing Oracle plugin in NagiosXI
Can you try -
If this doesn't work, then you may need to set the HOST = to be a resolvable name in your tsanames.ora. Try this, and then from the XI server, can you run nslookup sbldev?
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect '10.101.31.105:1526/SBLQA1' --username 'nagios' --password 'nagios' --mode sql --name="select count(*) from S_ESCL_REQ"Former Nagios Employee