question about the status of service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
shikpp
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

question about the status of service

Post 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!
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: question about the status of service

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
shikpp
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Post 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
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: question about the status of service

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
shikpp
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Post 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.
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: question about the status of service

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
shikpp
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: question about the status of service

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
shikpp
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: question about the status of service

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked