Running filter on cron

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

Running filter on cron

Post by Christo » Sat Jun 23, 2012 6:55 am

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 » Sat Jun 23, 2012 11:22 am

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 » Sat Jun 23, 2012 3:09 pm

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 » Sun Jun 24, 2012 7:34 am

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 6242 times

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

Re: Running filter on cron

Post by Christo » Wed Aug 29, 2012 10:42 pm

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 » Sat Sep 01, 2012 1:57 am

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 » Sat Sep 01, 2012 5:50 am

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 » Sat Sep 01, 2012 6:19 am

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 » Sat Sep 01, 2012 6:27 am

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 6043 times

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

Re: Running filter on cron

Post by McFuzz » Sat Sep 01, 2012 8:19 am

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 » Sat Sep 01, 2012 8:21 am

Your welkom!!

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

Kind regards, Christo

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests