Page 1 of 1

filters

Posted: Mon Jul 11, 2005 12:50 am
by jameswilson
Im trying to setup a filter to do a few things as follows
The machine is setup to 'mocord all cameras'
I want to keep 2 weeks full foptage from all cameras
then footage over 2 weeks old that has an max value greater than 0 i want to 'archive' the rest delete
Im hoping this would give me a reasoanble staorage time without losing all the little bits between alarms etc.
I still want the purge when full which i set at 97%
Is it possible to have half the disk for record and the other half for events only or is that waht 'archive' is for/

James

Posted: Mon Jul 11, 2005 1:04 am
by cordel
archive is just a bit in the database that can be set so when you run filters to delete events you don't delete the ones you want to keep. So there is no compresion like youmight think when you see archive. If you look at your defualt PurgeWhenFull filter the first query is select events NOT archived, so this way your events with archive checked do not get selected for deletion even if the rest of the querys in the filter are true.
Regards,
Cordel

Posted: Mon Jul 11, 2005 1:09 am
by jameswilson
cordel, any advice on the other bit. I think i can work out the rest but how do i tell the filter, date and time, eg greater than 20 days from today etc

James

Posted: Mon Jul 11, 2005 1:23 am
by cordel
Thats part of the perl date time module and it always gets me confused. It works a little backwards (IMHO) I know I wrote a how to here on the forum but this was all that turned up in my search.
http://www.zoneminder.com/forums/viewto ... ght=filter
http://www.zoneminder.com/forums/viewto ... ght=filter
But that should get you close to what you want. :wink:
you can specify days insted of weeks. Just don't check the delete box till your sure the filter is working right. You can run the query and you should see your oldest events.
Regards,
Cordel

Posted: Mon Jul 11, 2005 1:34 am
by jameswilson
as it written in perl if i read up on this perl i could use any expression i liked?

Posted: Mon Jul 11, 2005 2:35 am
by cordel
I know the ones in the two posts work becuase I use them one my cameras. I think you should be able to find the documentation (In Fedora it's /usr/share/doc/perl-time-highres-<version> ithink is what you want) in your documents directory. I've never looked at it, been meaning to and should :oops:

Posted: Mon Jul 11, 2005 9:57 am
by zoneminder
Essentially older than 20 days would be

Code: Select all

Date/Time < -20 day
if I remember correctly (I can't get into my box at the moment to check). It uses quite flexible parsing but it's best to keep it simple.

Phil

Posted: Mon Jul 11, 2005 9:25 pm
by jameswilson
thnaks all that got it does just what i want too!!!

James