Actually,there is a way.
If monitor Oracle databases to ensure your system is functioning properly.
Follow these steps:
1.
Acquire The Required RPM Files And Install Script
Open a terminal and log into your Nagios server as the root user. Download the install script to the /tmp folder of your Nagios
server:
Code: Select all
cd /tmp
wget http://assets.nagios.com/downloads/general/scripts/oracleinstall.sh
First thing we will need to determine is what architecture is running on your Nagios Linux server. If you already know it, you can skip
this step, but be sure to double-check as you will need to know it later in the document.
At your Linux command prompt type the following command:
This will return the architecture of your system. It will either be:
Or
The ? in
represent any numbers returned. However for our purposes it boils down to one thing, your system is 32 bit. If its equal
to the bottom then your architecture is 64 bit. With this information we can now download the proper RPMs.
Due to legal reasons, Nagios cannot provide direct download links to these RPMs so you will have to go to Oracle's website and download them. Navigate to
http://www.oracle.com/
and create an account.
Now based on the results from the previous
command, select the proper install for your particular Nagios installation, either 32 bit or 64 bit.
- Cap.PNG (4.2 KiB) Viewed 3513 times
NEXT STEP:
Run The Install Script
Once you've moved the script and all the .rpm files to the same directory, its time to execute the script:
Code: Select all
chmod +x oracleinstall.sh
./oracleinstall.sh
This script will take care of most of the dirty work. It will install some dependencies using yum, then grab the check_oracle_health tarball from the internet, configure and install it, then install the Perl dependencies through CPAN. At the very end, will dump out some variables that you will need to apply to your particular case. In my case they look like this:
Code: Select all
ORACLE_HOME=/usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
Copy these variable somewhere as you will need them later in the document.
Configure Oracle Plugin Commands
We need to make a few modifications to commands used by the Oracle wizards. The Oracle check plugins requires access to outside libraries, and Nagios does not spawn processes with access to outside environment variables, and these environment variables are particular to your computer. The install script should have created two environment variables for you (
ORACLE_HOME
and
LD_LIBRARY_PATH)
restart nagios service to apply configurations.
Finally lets test the plugin in your terminal in libexec directory see below:
Let me know how it goes