Page 1 of 2

Nagios not supressing service dependent checks

Posted: Mon Sep 04, 2017 4:26 am
by sheen.lim
Hello,

I am testing the service dependency on my test environment.

I have 2 Ubuntu Servers which is, 1 Nagios Monitoring Server (Server1), 1 Web Server (Server3).

I created this service dependency definition in my Nagios Monitoring Server. NOTE: Yes I know my service dependency does not make any sense but this is only for testing.
Image

Then I deliberately stopped the SSH service on the WebServer (Server3)
Image

But even the retry attempt has been maxed out, I still see the "Server3-HTTP" being checked on the Scheduling Queue.
Image

I thought by setting the 'execution_failure_criteria' to 'c' (Critical), the dependent service (which is Server3-HTTP in this case) will not be check at the event the master service (Server3-SSH in this case) is in critical status.

Any ideas?

Re: Nagios not supressing service dependent checks

Posted: Mon Sep 04, 2017 4:46 am
by sheen.lim
Hmm,, I think I know what's going on, does this only work when the dependent service also fails with the master service?
Correct me if I'm wrong, because I am still learning Nagios.

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 4:43 am
by sheen.lim
I tried deliberately stopping the SSH and HTTP (Apache) service on the monitored server but the scheduling queue still showing the active checks for the dependent service.
Any ideas?

Image

Image


What am i doing wrong?

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 8:25 am
by scottwilkerson
By setting up the dependency, it doesn't stop services from being checked, they are all checked regularly.

What it does in this configuration is stop notifications for Server3-HTTP if Server3-SSH is critical

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 9:11 am
by sheen.lim
Scottwilkerson,

Nagios documented that "execution_failure_criteria" is the status of the master service that triggers the suppression of checks.
https://assets.nagios.com/downloads/nag ... dependency

My code set it as 'c' so when the service check status has changed to Critical, the HTTP service check should have been skipped.

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 10:47 am
by scottwilkerson
sheen.lim wrote:Scottwilkerson,

Nagios documented that "execution_failure_criteria" is the status of the master service that triggers the suppression of checks.
https://assets.nagios.com/downloads/nag ... dependency

My code set it as 'c' so when the service check status has changed to Critical, the HTTP service check should have been skipped.
My apologies, you are correct, I mis-read your config.

What version of Nagios Core is this? Just want to make sure we aren't working on something that was already fixed in 4.1.0

Code: Select all

* Fix for not all service dependencies created (John Frickson)

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 11:40 am
by sheen.lim
I'm using Version 3.5.1, i installed it using sudo apt-get install nagios3.

How can I update my nagios using the terminal?

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 12:24 pm
by scottwilkerson
This will depend on how it was installed and the type of system.
If it was installed from source, you can see upgrade instructions here
https://assets.nagios.com/downloads/nag ... ading.html

If it was installed via repository you would want to perform the normal upgrade process for the system you are running

Re: Nagios not supressing service dependent checks

Posted: Tue Sep 05, 2017 12:25 pm
by scottwilkerson
This will depend on how it was installed and the type of system.
If it was installed from source, you can see upgrade instructions here
https://assets.nagios.com/downloads/nag ... ading.html

Latest version being 4.3.4

If it was installed via repository you would want to perform the normal upgrade process for the system you are running

Re: Nagios not supressing service dependent checks

Posted: Sun Sep 10, 2017 7:20 am
by sheen.lim
scottwilkerson wrote:
sheen.lim wrote:Scottwilkerson,

Nagios documented that "execution_failure_criteria" is the status of the master service that triggers the suppression of checks.
https://assets.nagios.com/downloads/nag ... dependency

My code set it as 'c' so when the service check status has changed to Critical, the HTTP service check should have been skipped.
My apologies, you are correct, I mis-read your config.

What version of Nagios Core is this? Just want to make sure we aren't working on something that was already fixed in 4.1.0

Code: Select all

* Fix for not all service dependencies created (John Frickson)
Sorry it took a while, I had to research how to install the Nagios4 and re-setup my entire test environment.
I am now using the Nagios 4.3.4

However I am still getting the same behavior regarding the servicedependency.

In my new environment, i now have Server2 as the monitored server.
Nagios is monitoring 3 services on Server2
SSH
HTTP
HTTP via SSH

HTTP via SSH is a service check dependent to the SSH service, and the service dependency is basically the same from the previous environment.
Image

Then again, I deliberately stopped the master service on the monitored server to simulate the function of the service dependency.
Image

But the Scheduling Queue is still checking for the dependent service (SSH Check - HTTP).
Image

Its driving me nuts.!!!