Page 1 of 1

How Do I Delete Over 2M Log Events

Posted: Wed Nov 11, 2020 3:51 am
by retirementhome
I have over 2,000,000 log entries, and quickly growing as I add more devices, and I would like to know how to delete large amounts of these logs and/or all of these log entries at once. Because my server is generating a lot of log entries at the moment, when I use the "CLEAR" button, it deletes 100 events, then, a few minutes later my log has 100 more events.

I am aware of the potential losses if these are removed. I would still like to know how to delete/purge my logs, as follows:

OPTION 1
Specify to ZM that I want to delete the oldest 1,000,000 log events.
In this situation, the query could be anything, but more than just the displayed 100 events.

OPTION 2
Purge all log events. Wipe that slate clean!

I would like to at least have both options available.

I eagerly await your responses. :)

Re: How Do I Delete Over 2M Log Events

Posted: Wed Nov 11, 2020 4:23 pm
by burger
Has already been answered.
e.g.
http://forums.zoneminder.com/viewtopic.php?f=36&t=25303
Please search before posting.

Limit is in console - options - logs.

Re: How Do I Delete Over 2M Log Events

Posted: Fri Nov 13, 2020 4:18 pm
by retirementhome
Perhaps I need to learn how to refine my searches, as I did search before posting.

Thank you for the link.

Seems the link you provided does not offer an official solution, but rather a weak workaround.

Re: How Do I Delete Over 2M Log Events

Posted: Fri Nov 13, 2020 4:35 pm
by burger
IIRC ZM will handle logs automatically with default settings. It's hands off. It doesn't ever need maintenance. There's no requirement to truncate transaction logs or any of that nonsense.

If for some reason, you had the logs fill up, you could manually truncate them, but for most people it isn't necessary. Or you have the option to adjust settings in console - options - logs. Review that page.

There is:
* When to delete logs after a set amount of days
* Log verbosity


If you had info or debug logging turned on, go to error or critical.