Hi.
I'm looking to store only 2 weeks of events backwards, erasing any events older then 2 weeks. Any idea how to achieve this (with the filters system for example)?
Perhaps it is possible to use mysql now() operator in the condition value field, and to cause that any date less then (now() - 14 days), will be erased?
Thanks.
Keeping only 2 weeks of events
Re: Keeping only 2 weeks of events
What about defining a filter like this one:SyRenity wrote: erasing any events older then 2 weeks
---
"Date/Time" "less than or equal to" "-14days"
Sort by: Date/Time Desc
Automatically delete all matches:
---
Uli
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Yes, the date/times are always relative to when the query is run.
You can't currently limit when the filters run directly but you can increase the interval (Options->System->ZM_FILTER_EXECUTE_INTERVAL). You could probably add a cron job to start and stop the zmfilter.pl process via zmdc.pl if you really wanted to limit running to nighttimes though.
Phil
You can't currently limit when the filters run directly but you can increase the interval (Options->System->ZM_FILTER_EXECUTE_INTERVAL). You could probably add a cron job to start and stop the zmfilter.pl process via zmdc.pl if you really wanted to limit running to nighttimes though.
Phil
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
It does if it crashes. If you explicitly stop it with
it should remain stopped. I can't say I've ever tried it though.
Phil
Code: Select all
zmdc.pl stop zmfilter.pl
Phil
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: