zm 1.30.4
Ubuntu 16.04
Hi ZM Community,
Trying to setup a filter that deletes a certain monitors events older than X days.
Event Filter setup as follows
Using Submit returns the expected results, however, when saved and allowed to run in the background zmfilter throws the following error:
2017-07-28 22:50:10.701910 zmfilter 11667 ERR Error parsing Sql. skipping filter '21DayContLimit' zmfilter.pl
2017-07-28 22:50:10.700960 zmfilter 11667 ERR Error parsing date/time '-21 day', skipping filter '21DayContLimit' zmfilter.pl
What am I missing?
Thanks in advance
Error parsing date/time - Filter issues
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Error parsing date/time - Filter issues
Try it w/o the negative logic.
Set your Date/Time expression to be greater than or equal to 21 day to delete events older than 21 days.
Set your Date/Time expression to be greater than or equal to 21 day to delete events older than 21 days.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: Error parsing date/time - Filter issues
Positive logic like so:
Maybe I've stumbled across something... ???
Submit returns no results and when allowed to run in the background (even though submit failed to return results) the log file shows no error.Maybe I've stumbled across something... ???
Last edited by Pedulla on Mon Jul 31, 2017 4:57 pm, edited 1 time in total.
Re: Error parsing date/time - Filter issues
Try "Date/Time" "Less than" "21 days ago" (older than 21 days) ?
Re: Error parsing date/time - Filter issues
@miikb's suggestion works and is nicely "readable"; I'll probably stick with that.
But get this....
I removed the space between the quantity and the type and it's working as well.
"Date/Time" "Less than or equal to" "-21day"
Thanks all for the help.
Solved!
But get this....
I removed the space between the quantity and the type and it's working as well.
"Date/Time" "Less than or equal to" "-21day"
Thanks all for the help.
Solved!
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Error parsing date/time - Filter issues
Glad you got it working, but you probably did run across a bug.
Previously, I just wanted you to remove the negative to see if that was causing the issue.
It seems this line if returning false:
https://github.com/ZoneMinder/ZoneMinde ... pl.in#L211
Curious if you could find the filter in your database, and post the sql string verbatim.
Previously, I just wanted you to remove the negative to see if that was causing the issue.
It seems this line if returning false:
https://github.com/ZoneMinder/ZoneMinde ... pl.in#L211
Curious if you could find the filter in your database, and post the sql string verbatim.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: Error parsing date/time - Filter issues
efforting... stand by....
Sorry it took so long, had to learn how to use MySQL.... :/
There are two filters in this table, the 21 day filter throws the error, the 18 day filter works. Also noticed, while testing that filter changes do not take effect until zm is restarted. Not sure if that is intended or not.
Sorry it took so long, had to learn how to use MySQL.... :/
There are two filters in this table, the 21 day filter throws the error, the 18 day filter works. Also noticed, while testing that filter changes do not take effect until zm is restarted. Not sure if that is intended or not.
Re: Error parsing date/time - Filter issues
table posted