Show alert after 30 min (without notificaciones).

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
alopera
Posts: 47
Joined: Fri Dec 21, 2018 5:08 am

Show alert after 30 min (without notificaciones).

Post by alopera »

I want that in my dashboard that a service show alert critical after 30 minutes.
For example when one interface from SWTICH Cisco consumes 10 Mbps for 30 minutes (the interval of query is 1 min)
I know this can be done with notifications but I don´t want notifications!!!! I only want the alert in dashboard. Is possible?


With Cisco is not possible passive checks.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Show alert after 30 min (without notificaciones).

Post by cdienger »

It sounds like you want to avoid seeing WARNING or CRITICAL alerts until an interface's bandwidth has been high for 30 minutes or more.

Since alerts trigger anytime a check returns a WARNING or CRITICAL response while in a SOFT state, you'll need to rely on some custom scripting to get what you want.

Pseudocode of a script that wraps that a check_rrdtraf check for example would look something like.

Code: Select all

bandwidth=/usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.55.5_12.rrd -w 500.0,500.0 -c 800.0,800.0 -l B

if(bandwidth> 10Mbps){
	if(currenttime - starttime > 30minutes){
		CRITICAL}
	else{
		if(starttime==0){
			starttime=now}
	}
}
else{
	starttime=0
	OK
}
The check_rrdtraff results would contain the current bandwidth(we don't care if the warning or critical levels are triggered in this case).

And you'll want to write the value of the starttime value to a file or other external location so that the check can read and update over subsequent runs.

Plugin dev guidelines can be found at http://nagios-plugins.org/doc/guidelines.html.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
alopera
Posts: 47
Joined: Fri Dec 21, 2018 5:08 am

Re: Show alert after 30 min (without notificaciones).

Post by alopera »

thanks!
The solution is complex, also want to use the option for other data (CPU for more than half an hour, etc.)

I think that is very interest alert (without notifications) when the event continus as CRITICAL for a certain time (for example 30 min)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Show alert after 30 min (without notificaciones).

Post by Box293 »

You could define a contact with dummy notification commands that do nothing and use that contact for the early state.

However I think escalations could be a solution.

https://assets.nagios.com/downloads/nag ... ations.pdf

They are complicated however they are useful for complicated setups.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
alopera
Posts: 47
Joined: Fri Dec 21, 2018 5:08 am

Re: Show alert after 30 min (without notificaciones).

Post by alopera »

Thanks . Tomorrow I see
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Show alert after 30 min (without notificaciones).

Post by Box293 »

Great, keep us posted
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked