Page 1 of 2

question about the status of service

Posted: Wed Sep 25, 2019 8:51 am
by shikpp
Hi,
I got a problem about the status of service while using "check_oracle_health" command.
the return of "check_oracle_health" command is OK, but the status of service is "Warning" as following picture.
1.png
the result of running command is also OK.
2.png
the status of service should be OK, but it is Warning.

what should I check first about the setting?

Many thanks in advance!
--------------------
Best regards!

Re: question about the status of service

Posted: Wed Sep 25, 2019 3:05 pm
by lmiltchev
Can you run the following command after you run your check from the CLI, and show the output?

Code: Select all

echo $?
Also, show the output of:

Code: Select all

ps -ef | grep nagios.cfg | grep -v grep

Re: question about the status of service

Posted: Thu Oct 17, 2019 11:57 pm
by shikpp
lmiltchev wrote:Can you run the following command after you run your check from the CLI, and show the output?

Code: Select all

echo $?
Also, show the output of:

Code: Select all

ps -ef | grep nagios.cfg | grep -v grep

Thank you very much for your reply.

Following you can see the result of running the commands.
2019-10-18_12-54-56.png

Re: question about the status of service

Posted: Fri Oct 18, 2019 1:24 pm
by benjaminsmith
Hello @shikpp,

Are you receiving notifications as well for the service? If not, then the monitoring engine must be processing the service as OK and the information in the dashlet is not getting populated correctly.

Can you send us your system profile so we can take a closer look at the system. Thanks.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.

Re: question about the status of service

Posted: Sun Oct 20, 2019 7:04 am
by shikpp
benjaminsmith wrote:Hello @shikpp,

Are you receiving notifications as well for the service? If not, then the monitoring engine must be processing the service as OK and the information in the dashlet is not getting populated correctly.

Can you send us your system profile so we can take a closer look at the system. Thanks.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.


hi benjaminsmith,
Thank you for your reply!
A notification was also sent while the result was OK.
2019-10-20_19-56-30.png
And attached you can find the profile.zip.
Many thanks in advance!
--------
Best regards,
ShiKe

Moderator's Note: The profile has been shared with the Nagios Support team, and has been removed from the public forum.

Re: question about the status of service

Posted: Mon Oct 21, 2019 12:46 pm
by benjaminsmith
Hello @shikpp,

Thanks for sending over your system profile. Did you always have issues with this plugin or was it working correctly. We noticed the configuration file for oracle host is not in the configuration hosts directory where it is normally stored.

Please remove all the files inside the /var/tmp/check_oracle_health directory, and make sure the nagios user has permissions to write to this directory.

Check the permissions

Code: Select all

ls -ld /var/tmp/check_oracle_health
Next try running the check command from the terminal as before but this time please log in as the nagios user (instead of root) and post the output.

Code: Select all

su nagios

Re: question about the status of service

Posted: Tue Oct 22, 2019 2:35 am
by shikpp
benjaminsmith wrote:Hello @shikpp,

Thanks for sending over your system profile. Did you always have issues with this plugin or was it working correctly. We noticed the configuration file for oracle host is not in the configuration hosts directory where it is normally stored.

Please remove all the files inside the /var/tmp/check_oracle_health directory, and make sure the nagios user has permissions to write to this directory.

Check the permissions

Code: Select all

ls -ld /var/tmp/check_oracle_health
Next try running the check command from the terminal as before but this time please log in as the nagios user (instead of root) and post the output.

Code: Select all

su nagios
hi benjaminsmith,
the nagios user has the write right to the directory "/var/tmp/check_oracle_health". the result is as following screenshot.
2019-10-22_15-18-00.png
This plugin is working well in the version 5.5.11
2019-10-22_15-20-49.png
and attached you can find the profile of 5.5.11.
Many thanks in advance!
-------------------
Best regards,
shike

Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.

Re: question about the status of service

Posted: Tue Oct 22, 2019 11:41 am
by tgriep
First, clear out the temp files by running this.

Code: Select all

rm -fr /var/tmp/check_oracle_health/*
Then run the plugin as the nagios user by running the following in a shell. Post the full output

Code: Select all

su - nagios
/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 'oracle:1521/tc9' --username 'infodba' --password 'infodba' --mode sga-dictionary-cache-hit-ratio --warning 98: --critical 95:
echo $
/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='oracle:1521/tc9' --username='infodba' --password='infodba' --mode=connection-time --warning=1 --critical=5
echo $?
Also, run this to get the version of the plugin and post it here.

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 --version

If the above tests show the correct status from the command line, go to the GUI and force the check to run and see if the status is updated there.

Re: question about the status of service

Posted: Tue Oct 22, 2019 10:15 pm
by shikpp
tgriep wrote:First, clear out the temp files by running this.

Code: Select all

rm -fr /var/tmp/check_oracle_health/*
Then run the plugin as the nagios user by running the following in a shell. Post the full output

Code: Select all

su - nagios
/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 'oracle:1521/tc9' --username 'infodba' --password 'infodba' --mode sga-dictionary-cache-hit-ratio --warning 98: --critical 95:
echo $
/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='oracle:1521/tc9' --username='infodba' --password='infodba' --mode=connection-time --warning=1 --critical=5
echo $?
2019-10-23_10-58-03.png
It seems that there is something error while running service command by using "nagios" account, could you tell me where i can find the log file

Also, run this to get the version of the plugin and post it here.

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 --version
2019-10-23_16-54-30.png
If the above tests show the correct status from the command line, go to the GUI and force the check to run and see if the status is updated there.
Hi tgriep,
please see the result of commands above.
The status is updated while forcing running the check in GUI.
2019-10-23_11-11-59.png
Many thanks in advance!
----------------------------
Best regards,
shike

Re: question about the status of service

Posted: Wed Oct 23, 2019 10:17 am
by tgriep
The version of the plugin you are running is over 5 years old and you should update it to the latest version.
You can get it at the following link. It also has instructions for installing it.
https://labs.consol.de/nagios/check_ora ... index.html