PurgeWhenFull doesn't work
PurgeWhenFull doesn't work
Hi.
I configured the PurgeWhenFull filter on the "filter" window from the main
console to run in background and to automatically delete the oldest 200 events "asc" ordered by date/time.
I don't know if I setted up the filter correctly, because it doesn't work.
This evening I found the hard disk filled at 100%.
On the http://www.zoneminder.com/wiki/index.ph ... my_disk.3F page of your wiki I read that there is a way to configure the percentage full to be reached to let the filter to automatically executed, but I didn't found this feature.
I am using the latest 1.23.0 version of ZoneMinder.
Could you help me, please?
Thank you very much in advance!
Bye.
I configured the PurgeWhenFull filter on the "filter" window from the main
console to run in background and to automatically delete the oldest 200 events "asc" ordered by date/time.
I don't know if I setted up the filter correctly, because it doesn't work.
This evening I found the hard disk filled at 100%.
On the http://www.zoneminder.com/wiki/index.ph ... my_disk.3F page of your wiki I read that there is a way to configure the percentage full to be reached to let the filter to automatically executed, but I didn't found this feature.
I am using the latest 1.23.0 version of ZoneMinder.
Could you help me, please?
Thank you very much in advance!
Bye.
I forgot to tell you that I didn't see any error messages in the zmfilter.log file, only repeatedly these messages:
Bye!
Code: Select all
01/16/08 00:15:23.997191 zmfilter[23848].DBG [Reloading filters]
01/16/08 00:15:23.997963 zmfilter[23848].DBG [Found filter 'PurgeWhenFull']
01/16/08 00:25:24.584834 zmfilter[24761].INF [Scanning for events]
01/16/08 00:25:29.627910 zmfilter[24761].DBG [Reloading filters]
01/16/08 00:25:29.628620 zmfilter[24761].DBG [Found filter 'PurgeWhenFull']
01/16/08 00:35:29.700633 zmfilter[25880].INF [Scanning for events]
01/16/08 00:35:34.716780 zmfilter[25880].DBG [Reloading filters]
01/16/08 00:35:34.717190 zmfilter[25880].DBG [Found filter 'PurgeWhenFull']
You are misssing the small plus & minus symbols to click on to add or delete terms from the filter, they are supposed to appear in the upper right corner of the box, so you have a way to add a term, the default filter comes up with only 1 term & no + or - symbols. I didn't repeat the process enough to document exactly what I did to get the plus & minus symbols to appear, but once they appear, they will stay there. I haven't seen this behavior in prevease releases either. I think all I did was kept messing with saving & changing the "sort by" drop down to different options, then eventually the + - signs appear & you can add a second term to the filter, which you always choose archive status & set to unarchived only, then the other filter you want is Disk percent is greater than. I suggest set it at 50 % or less til you know all is well, then set it at 90 or whatever. Try setting it to archive status first, then save it, then see if they appear.
I'm sorry, but I don't have the plus and minus small symbols on that page.electron wrote:You are misssing the small plus & minus symbols to click on to add or delete terms from the filter, they are supposed to appear in the upper right corner of the box, so you have a way to add a term, the default filter comes up with only 1 term & no + or - symbols.
I attach a screenshot for your reference:
Thank you very much!
Bye.
Query should be:
Code: Select all
trms=2&obr1=&cbr1=&attr1=Archived&op1==&val1=0&cnj2=and&obr2=&cbr2=&attr2=DiskPercent&op2=>=&val2=95&sort_field=Id&sort_asc=1&limit=5
I changed the value of the "query" item in the database for the "PurgeWhenFull" filter, but nothing changed.
I don't any new items in the filter configuration window for the "PurgeWhenFull" filter.
I realized that if I don't choose the "PurgeWhenFull" filter I see many other values for the filter's configuration, for example "Archive status", "Disk percent", "Disk blocks", "System load", etc.
How I can solve? Simply deleting the existing "PurgeWhenFull" filter and recreating?
I don't any new items in the filter configuration window for the "PurgeWhenFull" filter.
I realized that if I don't choose the "PurgeWhenFull" filter I see many other values for the filter's configuration, for example "Archive status", "Disk percent", "Disk blocks", "System load", etc.
How I can solve? Simply deleting the existing "PurgeWhenFull" filter and recreating?
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
it look slike you havnt edited the purge when full filter, you need to set the disk % you want it to start working at. As you havnt it wont function as it has nothing to filter.
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
thats the way just ensure you have set it to greater than 90% not less than
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Click the plus sign under Chiudi in upper right corner of screen, add another term to sort by, you need these 2 for a purge when full filter to work, Archive Status, set to Unarchived only, and Disk Percent, set to 50 %. Set the limit to first 5, 10 or 15 results only, should be enough, you have it set way to high. If it works it will keep your disk at about 50 % full within a few percent, then when you see it working at 50 %, set it to higher percent, up to about 90 % is OK for most, I think.
I noticed that on my new ZM builds the default PurgeWhenFull filter doesn't give me the ability to choose the disk percent option either. I have to delete the default xPurgeWhenFull and then create a new PurgeWhenFull then life is good. Is this by design for some reason? Would it make more sense to ship ZM with a working PurgeWhenFull with a disk percent filter at 90 and 100 events setting? Might make it easier for people who are new to ZM.
-
- Posts: 17
- Joined: Mon Jun 25, 2007 6:29 pm
Fix in new xPurgeWhenFull filter definition
There is now serialize - unserialize module in use. And I think we have to change:
Change should go into upgrade scripts and zm_create.sql
[/code]
tocordel wrote:Query should be:Code: Select all
trms=2&obr1=&cbr1=&attr1=Archived&op1==&val1=0&cnj2=and&obr2=&cbr2=&attr2=DiskPercent&op2=>=&val2=95&sort_field=Id&sort_asc=1&limit=5
Code: Select all
a:4:{s:5:"terms";a:2:{i:0;a:3:{s:4:"attr";s:8:"Archived";s:2:"op";s:1:"=";s:3:"val";s:1:"0";}i:1;a:4:{s:3:"cnj";s:3:"and";s:4:"attr";s:11:"DiskPercent";s:2:"op";s:2:">=";s:3:"val";s:2:"95";}}s:10:"sort_field";s:8:"DateTime";s:8:"sort_asc";s:1:"1";s:5:"limit";s:1:"5";}
Code: Select all
diff -urNad ZoneMinder-1.23.1~/db/zm_create.sql.in ZoneMinder-1.23.1/db/zm_create.sql.in
--- ZoneMinder-1.23.1~/db/zm_create.sql.in 2008-01-13 21:17:59.000000000 +0300
+++ ZoneMinder-1.23.1/db/zm_create.sql.in 2008-02-24 17:06:04.000000000 +0300
@@ -503,7 +503,7 @@
--
-- Add a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
--
-insert into Filters values ('xPurgeWhenFull','trms=2&obr1=&cbr1=&attr1=Archived&op1==&val1=0&cnj2=and&obr2=&cbr2=&attr2=DiskPercent&op2=>=&val2=95&sort_field=Id&sort_asc=1&limit=5',0,0,0,0,0,0,'',1,0);
+insert into Filters values 'xPurgeWhenFull','a:4:{s:5:"terms";a:2:{i:0;a:3:{s:4:"attr";s:8:"Archived";s:2:"op";s:1:"=";s:3:"val";s:1:"0";}i:1;a:4:{s:3:"cnj";s:3:"and";s:4:"attr";s:11:"DiskPercent";s:2:"op";s:2:">=";s:3:"val";s:2:"95";}}s:10:"sort_field";s:8:"DateTime";s:8:"sort_asc";s:1:"1";s:5:"limit";s:1:"5";}',0,0,0,0,0,0,'',1,0);
Last edited by Kushnirenko on Mon Feb 25, 2008 10:48 am, edited 1 time in total.