filters

Support and queries relating to all previous versions of ZoneMinder
Locked
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

filters

Post 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
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

as it written in perl if i read up on this perl i could use any expression i liked?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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:
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

thnaks all that got it does just what i want too!!!

James
Locked