question about the status of service

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

question about the status of service

Postby shikpp » Wed Sep 25, 2019 8:51 am

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!
shikpp
 
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Postby lmiltchev » Wed Sep 25, 2019 3:05 pm

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
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!
User avatar
lmiltchev
QA Manager
 
Posts: 12630
Joined: Mon May 23, 2011 12:15 pm

Re: question about the status of service

Postby shikpp » Thu Oct 17, 2019 11:57 pm

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
shikpp
 
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Postby benjaminsmith » Fri Oct 18, 2019 1:24 pm

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[b] 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!
User avatar
benjaminsmith
 
Posts: 1874
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: question about the status of service

Postby shikpp » Sun Oct 20, 2019 7:04 am

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[b] 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.
shikpp
 
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Postby benjaminsmith » Mon Oct 21, 2019 12:46 pm

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!
User avatar
benjaminsmith
 
Posts: 1874
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: question about the status of service

Postby shikpp » Tue Oct 22, 2019 2:35 am

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.
shikpp
 
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Postby tgriep » Tue Oct 22, 2019 11:41 am

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.
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!
User avatar
tgriep
Madmin
 
Posts: 8361
Joined: Thu Oct 30, 2014 9:02 am

Re: question about the status of service

Postby shikpp » Tue Oct 22, 2019 10:15 pm

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
shikpp
 
Posts: 6
Joined: Wed Sep 25, 2019 8:27 am

Re: question about the status of service

Postby tgriep » Wed Oct 23, 2019 10:17 am

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_oracle_health/index.html
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!
User avatar
tgriep
Madmin
 
Posts: 8361
Joined: Thu Oct 30, 2014 9:02 am

Next

Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 16 guests