Service notify

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.
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Service notify

Post by HaschkeD »

Hello,
we use Nagios Core 3.4 with Nagios QL.
Where can i define that if a host is down no service notifications are sent from the host? I will only be notified if the host is down or a Service, but not with the dependencies.
Background:
I have hosts where i have definied the services under service settings.
But i have some host where i have build a hostgroup. In some services this hostgroup is selected because so that I don't have to assign each service to a host.
If this host is down i get a notification from every service....i'd like to stop that.

Regards
Dennis
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service notify

Post by benjaminsmith »

Hi Dennis,

If you are willing to upgrade Nagios Core to 4.1.0 or greater, there is a configuration level setting to disable service checks when the host is down. You'll set the following in /usr/local/nagios/etc/nagios.cfg:

Code: Select all

host_down_disable_service_checks=1
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!
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Service notify

Post by HaschkeD »

Sorry, is Core 3.2.3 :-(
Is in this version no option that if the host is down no service notifications will be sent additionally?
Or is this possibly a standard behavior and only because of the host group assignments in some services like this?
I think if i assign the Services not over the hostgroups this works fine…...
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service notify

Post by benjaminsmith »

Hello @HaschkeD,

Yes, that is the case. With that option, the host goes down, and active checks are disabled for associated services. The service will retain the state same state history until the host goes back up and active checks resume.

If you're unable upgrade, I would recommend configuring service dependencies.

Documentation
Host and Service Dependencies
Nagios Core Object Definitions
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!
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Service notify

Post by HaschkeD »

Hi,
last week i change the settinngs so that i only put services in the service settings and not over hostgroups, see attachment.
On 15.09. 03:05 i get service notifications for server XENAPP02_Shop, see attachment.
My settings in Nagios QL is shown at the attachment too.
Any idea why that doesn't work that when a host is down that i get NO service notifications that are bind on that server?

Thanks and regards
Dennis
Attachments
C -Users-haschked-Desktop-notifications.pdf
(756.7 KiB) Downloaded 129 times
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service notify

Post by benjaminsmith »

Hello,
last week i change the settinngs so that i only put services in the service settings and not over hostgroups, see attachment.
My apologies, but not quite understanding what changes were made. Can post the configuration files for us to review? Thanks.
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!
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Service notify

Post by HaschkeD »

Hi,
sorry but im using only NagiosQL and my Nagios admin is actually not in office.
I have no access to the log files.

I mean that i put the services directly to a host, see attachment.
But if a host is down i still receive service notifications for that host.
I'd like to stop that.
Attachments
services.JPG
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service notify

Post by benjaminsmith »

Hello,

If you unable to upgrade, you'll have to configure service dependencies to restrict notifications or service checks when the host is down.

See: http://sites.box293.com/nagios/guides/c ... --services
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!
HaschkeD
Posts: 44
Joined: Tue Feb 02, 2016 8:35 am

Re: Service notify

Post by HaschkeD »

OK, i will ask my Nagios admin if it is possible to upgrade them.

But i don't understand that:

Service dependencies allow you to suppress notifications and active checks of services based on the status of other service(s). Why would you want this anyway, when a host goes down doesn't this happen anyway?

Yes and No.
Yes, when a host goes down (non-OK state), Nagios suppresses notifications for it's child services.
No, when a host goes down (non-OK state), Nagios continues to actively execute the checks on it's child services.

I think "Yes" is the normal behavior in Nagios?!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service notify

Post by benjaminsmith »

Hello,

When a host goes down, the services still get executed and can result in services in an unknown or critical state. Nagios suppresses any notifications however they still appear as critical in the interface.
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!
Locked