Nagios not supressing service dependent checks

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Nagios not supressing service dependent checks

Post 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?
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Re: Nagios not supressing service dependent checks

Post 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.
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Re: Nagios not supressing service dependent checks

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios not supressing service dependent checks

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Re: Nagios not supressing service dependent checks

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios not supressing service dependent checks

Post 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)
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Re: Nagios not supressing service dependent checks

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios not supressing service dependent checks

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios not supressing service dependent checks

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sheen.lim
Posts: 25
Joined: Mon Aug 07, 2017 7:49 pm

Re: Nagios not supressing service dependent checks

Post 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.!!!
Locked