Clear all events

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
linuxnag
Posts: 53
Joined: Tue Nov 12, 2013 4:05 pm

Clear all events

Post by linuxnag »

This is a rather unusual request but there is a need for it.
What I want to do is clear all events, (critical and warnings).

This way I want Nagios to "start from scratch"

The reason for this is a separate issue, regarding another product
and synchronized communications between Nagios and them.

Thank you in advance.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Clear all events

Post by slansing »

You want to clear all current states of your hosts/services? You can stop nagios, and remove the retention.dat file and then start nagios again, that will effectively re-schedule everything and start it all from a pending state.

Code: Select all

service nagios stop

rm -f /usr/local/nagios/var/retention.dat

service nagios start
linuxnag
Posts: 53
Joined: Tue Nov 12, 2013 4:05 pm

Re: Clear all events

Post by linuxnag »

Perfect!
You guys are the best!

Thank you!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Clear all events

Post by slansing »

Awesome, glad that is what you needed. Closing this up.
Locked