Page 1 of 2

Time range for alert emails

Posted: Mon Dec 09, 2019 11:34 am
by mbeebe
Hello,

I have an alert set up in NLS that sends email out when triggered. However, I only want this email sent out between the hours of 6:00am and 6:00pm.

In Nagios, this can be accomplished by defining a time range for alerts. Is there a similar function in NLS?


-- Mike Beebe

Re: Time range for alert emails

Posted: Mon Dec 09, 2019 12:47 pm
by mbellerue
I don't think there is a way to set that up in LS alone. You could send the alerts to a passive check on Nagios XI via NRDP, and then Nagios XI could handle when to send out notifications. Would that solution work for you?

Re: Time range for alert emails

Posted: Mon Dec 09, 2019 12:53 pm
by mbeebe
mbellerue wrote:I don't think there is a way to set that up in LS alone. You could send the alerts to a passive check on Nagios XI via NRDP, and then Nagios XI could handle when to send out notifications. Would that solution work for you?
Would NLS be able to pass the message body of the alert to Nagios via NRPD? The only reason we're using NLS to send alerts is because we can't figure out how to include a NLS message body in a Nagios alert.

-- Mike Beebe

Re: Time range for alert emails

Posted: Mon Dec 09, 2019 1:53 pm
by lmiltchev
Would NLS be able to pass the message body of the alert to Nagios via NRPD? The only reason we're using NLS to send alerts is because we can't figure out how to include a NLS message body in a Nagios alert.
Can you show us a "sanitized" message of your alert? You should be able to pass it via NRDP to the Nagios XI server.

Re: Time range for alert emails

Posted: Tue Dec 10, 2019 12:37 pm
by mbeebe
Hello,

There's an example in this thread: https://support.nagios.com/forum/viewto ... 38&t=56745

Thanks,

-- Mike Beebe

Re: Time range for alert emails

Posted: Tue Dec 10, 2019 5:18 pm
by mbellerue
It might be best to come back to this if adding the %lastalertlog% doesn't send the log message to Nagios XI. Because if it does send the log to XI, then that pretty much solves this thread. If it doesn't, we can come back and look at other potential solutions.

Re: Time range for alert emails

Posted: Tue Dec 31, 2019 1:08 pm
by mbeebe
mbellerue wrote:It might be best to come back to this if adding the %lastalertlog% doesn't send the log message to Nagios XI. Because if it does send the log to XI, then that pretty much solves this thread. If it doesn't, we can come back and look at other potential solutions.
Hello,

Would it be possible to pick this up again?

Thanks,

-- Mike Beebe

Re: Time range for alert emails

Posted: Thu Jan 02, 2020 1:11 pm
by mbellerue
Absolutely. Just to recap, we were hoping that getting %lastalertlog% working would allow us to send the log message to Nagios XI. In doing so that would allow us to use XI for the more granular time checks. So what we're looking to do here is either get the last log message to Nagios XI, or to have better control over the time that alerts run in Log Server. Does that sound right?

Re: Time range for alert emails

Posted: Thu Jan 02, 2020 4:13 pm
by mbeebe
mbellerue wrote:Absolutely. Just to recap, we were hoping that getting %lastalertlog% working would allow us to send the log message to Nagios XI. In doing so that would allow us to use XI for the more granular time checks. So what we're looking to do here is either get the last log message to Nagios XI, or to have better control over the time that alerts run in Log Server. Does that sound right?
That's correct, thanks.

-- Mike

Re: Time range for alert emails

Posted: Fri Jan 03, 2020 10:53 am
by mbellerue
So I was scratching my head trying to figure out how to get this to work, and I was coming at it from the perspective of going from Log Server to XI. But XI has a Log Server wizard that allows you to execute a query on Log Server. So you create your query, run the Log Server wizard, point it at the query, and set the notification time range. Would that suit your needs?