Setting Notifications in a queue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Setting Notifications in a queue

Post by smersh »

Hello,
I'm using acoustic notifications as it's described in the following document:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Everything works fine until Nagios send multiple alerts simultaneously, when a multiple number of problems rise. In this situation the Raspberry executes playback of all receives alerts together.

Is it possible to set Nagios to send notifications in a queue?

Regards
Nick
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Setting Notifications in a queue

Post by eloyd »

You would have to implement such a thing yourself. Not sure how you're using the Pi exactly, but if you're just alerting based on email, you could use procmail to take the email, parse it appropriately, then write into a file on your local Pi filesystem. Then have a "reaper" process that looks at the file every 10 seconds (or whatever) and processes thing in it in sequence. Poor man's queue, but it would work.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Setting Notifications in a queue

Post by tmcdonald »

smersh wrote:Is it possible to set Nagios to send notifications in a queue?
Technically speaking there is a queue of sorts in that notification events are processed from the DB, but they're just processed really quickly so it seems like a burst. Putting a program-wide delay between notifications could cause a huge backlog in which really important notifications would be caught up.
Former Nagios employee
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Setting Notifications in a queue

Post by smersh »

Looks like I have found the solution.
It's a task-spooler (tsp for Debian) which takes control of the batch execution automatically.

In my case the wrapper at the alert receiving side (RPi) executes tsp aplay ... . The tsp puts every alert in a queue, executing the next one after the previously executed ends.

Very easy and effective.

Regards!
Nick.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Setting Notifications in a queue

Post by tmcdonald »

Glad to hear it! Are we good to mark this as resolved?
Former Nagios employee
smersh
Posts: 55
Joined: Tue Apr 26, 2016 4:08 am

Re: Setting Notifications in a queue

Post by smersh »

Yes, thank you!
NJ
Locked