Send notification right away

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Send notification right away

Post by jkinning »

I have some checks that Nagios XI is using the check_nrpe to call a PowerShell script that the NSClient++ runs. It is checking errors within a database table. I am using the following for my intervals
Check interval = 5
Retry interval = 1
Max check attempts = 5

If I want the service to send out the notification as soon as it is received would changing my intervals to all have 1min provide me with that result?

The issue is when the alert happens and it is in SOFT state by the time the notification should be sent out Nagios sees it as OK and never alerts. So I just need to have it send out a notification and not retry. I wasn't sure if a zero is a valid number as I was going to try this.
Check interval = 5
Retry interval = 0
Max check attempts = 0

Just looking for advice on having notifications sent out immediately when a service goes critical.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Send notification right away

Post by npolovenko »

Hello, @jkinning.

You need to set the notification interval to 0.
notification_interval:This directive is used to define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios will not re-notify contacts about problems for this host - only one problem notification will be sent out.
from https://assets.nagios.com/downloads/nag ... tions.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Send notification right away

Post by jkinning »

I am looking to send out the 1st notification right away and not have it wait. That setting would be after it sends out the 1st notification correct?

See how it waits for 5 attempts and shows SOFT, i need or want it to be sent 1 of 1 with a HARD so the notification is sent.
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Send notification right away

Post by npolovenko »

@jkinning, I apologize, actually you need to change the max_check_attempts option to 1.

Code: Select all

Service - max check attempts

This directive is used to define the number of times that Nagios will retry the service check command if it returns any state other than an OK state. Setting this value to 1 will cause Nagios to generate an alert without retrying the service check again.
That also means the service check will go into a hard state right away.

Please disregard my previous answer.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Send notification right away

Post by jkinning »

Thanks! You can close this.
Locked