Running filter on cron

Forum for questions and support relating to the 1.25.x releases only.
Locked
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Running filter on cron

Post by Christo »

Hello all,

Ill have a ZoneMinder system thats running out of diskspace.

Because the availible internet bandwidth is low, I like to release this system by a time sceduled upload / deleting events during nighttimes.

With the eventfilters, this was a easy job, but... because the available internet bandwith is during the day even worse.

For this reason, I like to run this filter only during nighttime hours.

Note:
- Adding the time filter to this "Controlled Upload Event Filter" causes only that events within the selected time frame are uploaded.
- For future developments, it would be nice if a field like systemtime is selectable to.

Who can help me out??!

Thanks in advance, Christo
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Running filter on cron

Post by bb99 »

This is not a direct answer but will give ideas: http://www.zoneminder.com/forums/viewto ... nge#p72217
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Running filter on cron

Post by Christo »

Hello bb99,

Thanks for your reply!!

I am using this option to turn my ZoneMinder system into Day / Night Mode, but the ZoneMinder filter options are excuted by a perl program (zmfilter.pl).

So, I am looking for an option / command to run filters that are not executed (in the background= checkbox unmarked) by this zmfilter.pl program.

But nevertheless. again.... thanks for your reply!!

Christo
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Running filter on cron

Post by Christo »

Hello all,

Related to my request for help / support, I did some thinking and found a workable sollution to get this done.

It is not perfect, but it works for now!!

See attached screenshot of the filter I use.

I still prefer to run this filter "Controlled Upload Event Filter" by cron, but for now it's the best I can get!

Who has a better ID?

Regards, Christo
Attachments
Controlled Upload Event Filter.jpg
Controlled Upload Event Filter.jpg (83.56 KiB) Viewed 7907 times
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Running filter on cron

Post by Christo »

Hello all,

Although the filter I have setup, seems to do its job just fine!!

I am still looking for an option to do this exactly when I like it to happen!!

I hope that out there someone has found the sollution and willing to help me out..

It would be nice to solve this the way it's done to change the ZoneMinder runstate..

Something like a cronjob on /usr/local/bin/zmfilter.pl "PurgeWhenFull"

Give it a go guys

Thanks in advance, Christo
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: Running filter on cron

Post by McFuzz »

On a slightly related note - do you happen to know how to setup a filter that will erase recordings after X amount days as opposed to when the disk reaches a certain percent? I have all my 'alarms' uploaded right away to my FTP server, but I don't see a need to have the events visible for more than 7 days or 10 days...

Also - I noticed that when creating filters, you can create a video but the video is not uploaded in the compressed archive :(
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Running filter on cron

Post by Christo »

McFuzz wrote:On a slightly related note - do you happen to know how to setup a filter that will erase recordings after X amount days as opposed to when the disk reaches a certain percent? I have all my 'alarms' uploaded right away to my FTP server, but I don't see a need to have the events visible for more than 7 days or 10 days...

Also - I noticed that when creating filters, you can create a video but the video is not uploaded in the compressed archive :(
Hello McFuzz,

For automatic Erase events after a few days you should add the the - #day setting to a special made delete filter.
(see example that I have uploaded within this post on "Running filter on cron".

If a video is not generated on an event (flield unmarked), this video can not be uploaded, so check if the filter that generated these events, has this field (generated video) marked.

Regards, Christo
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: Running filter on cron

Post by McFuzz »

Hi Christ,

A bit confused here... I don't have a "days" option on the far left drop down menu; perhaps you mean Time?

Thanks!
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Running filter on cron

Post by Christo »

Hello McFuss,

I have added a screenshot, to show you how this must be done.

Just play with the setting and try "submit" (without the marked delete box) to know if you have the required settings.


Goodluck and regards, Christo
Attachments
Filter.jpg
Filter.jpg (78.06 KiB) Viewed 7708 times
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: Running filter on cron

Post by McFuzz »

Christo wrote:Hello McFuss,

I have added a screenshot, to show you how this must be done.

Just play with the setting and try "submit" (without the marked delete box) to know if you have the required settings.


Goodluck and regards, Christo

Awesome - thanks!!
Christo
Posts: 89
Joined: Wed Feb 01, 2012 9:48 pm

Re: Running filter on cron

Post by Christo »

Your welkom!!

And you can also use an input like: -#hour or -#month

Kind regards, Christo
Locked