How Do I Delete Over 2M Log Events

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
retirementhome
Posts: 11
Joined: Wed Aug 26, 2020 6:34 pm

How Do I Delete Over 2M Log Events

Post 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. :)
User avatar
burger
Posts: 417
Joined: Mon May 11, 2020 4:32 pm

Re: How Do I Delete Over 2M Log Events

Post 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.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
retirementhome
Posts: 11
Joined: Wed Aug 26, 2020 6:34 pm

Re: How Do I Delete Over 2M Log Events

Post 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.
User avatar
burger
Posts: 417
Joined: Mon May 11, 2020 4:32 pm

Re: How Do I Delete Over 2M Log Events

Post 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.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Post Reply