How do I clear the event history/event log? (2.1.0b6 raw)

I’ve figured out how to clear the logwatch stuff from my hosts: just delete the log files.

What is the best way to clear the overall CheckMk event history logs? Just delete a file? Which file(s) and where?

2.1.0b6 raw on Ubuntu Focal.

Thanks!

The event history can bei found in “~/var/nagios/archive”.
You will find a file on daily basis and can remove all files if you want. Then restart your monitoring core and you have only the events from today left.

Hi Andreas,

That did not have the desired effect. I want all events gone up to the minute.

What happens if I delete ~/var/nagios/livestatus.log and then “omd restart core”?

Thanks,

aa

Shamelessly bumping this topic in the hope of getting an answer…

If you remove the archive files and the the current log then all the events are gone.
Don’t forget to stop the core before you do this.

Andrea,

That also did not work. First I asserted omd stop. Then I deleted all logs in both ~/var/nagios/ and ~/var/nagios/archive. Then I asserted omd start.

This did not clear the list of events nor did it clear the alert statistics.

What am I doing wrong, please?

Bumping this…

Still looking for a way to clear the event list completely. The methods given above have not worked for me.

Thanks

If the remove of the archive and active log file is not working, i must ask what event list do you mean?

The log that contains this information:

As you see it shows current events. These events are not in the archive log but in the active log.
If you want to get rid of all this you need to stop the core, remove the archive logs and the actual log inside ~/var/nagios/. That’s all

That seemed to work. Would you please clarify, however, that inside ~/var/nagios I should delete livestatus.log (and its backups) AND nagios.log? I did delete them all, including nagios.log, and it seemed to give me the result I wanted. I just want to be certain that nagios.log should also be deleted.

Only the nagios.log is relevant.

That’s working brilliantly, and it’s super helpful as I continue to tune my installation.

Now that I finally have a handle on host and service retry check intervals and maximum number of check rules I’m finally closing in on a stable and livable configuration.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.