Filters not deleting

Support and queries relating to all previous versions of ZoneMinder
Locked
EvilTom
Posts: 2
Joined: Sun Mar 21, 2010 6:13 pm

Filters not deleting

Post by EvilTom »

Hi all,
I'm having a problem getting filters to delete events.

I have to filters running in the background. One is the default PurgeWhenFull one altered to work at 75% disc usage, and the other one I have created to delete my continuous records after 48 hours. I added this filter when I first built the system a week ago and just assumed it was working. Turns out it wasn't. This is an identical to the filter I had running with no problems for several weeks on my previous install so I'm happy the filter design is not at fault.

When I went to log in yesterday I encountered php device full errors. I SSHed in and discovered that the disc was 87% full and the INode allocation was 100% used. I manually deleted events from the file system and ran zmaudit. After that I was able to log in.

Looking at the filter in question, I see it brings back the results I want it to when I click submit, i.e. anything over 48 hours old and where cause = Continuous. But despite the delete all matches option being checked the events don't get deleted when I click execute. I have had a look at the system log and nothing obvious jumps out at me. I have also set permissions for the events folder to 777 but this hasn't worked. ZoneMinder is able to delete event files anyway since selecting one or more events from the filters results and then clicking delete will remove them.

I'm reasonably new to ZM so am not completely sure where to start looking for the cause of this problem. Has anyone encountered it before?

I'm using ZM v1.23.3 installed by the package manager onto a clean install of ubuntu 9.04.
As far as I know I followed the same steps as I did for my previous install which worked flawlessly.

Any help anyone can provide would be appreciated.

Many Thanks
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

make sure
RUN_AUDIT Run zmaudit to check data consistency (?)
is checked

Sounds like you have fast deletes(db only) enabled and this option off.
Audit just check if its in db if its not it deletes it.
EvilTom
Posts: 2
Joined: Sun Mar 21, 2010 6:13 pm

Post by EvilTom »

Thanks for the reply.
Both options are checked.

It's not really deleting the files from the disc that's the problem. If I tick the box next to an event then click delete, the event is deleted from the database and the disc a few minutes later. It's just filters that cant seem to trigger this delete.
grndamgt4
Posts: 24
Joined: Tue Oct 13, 2009 5:05 pm

Post by grndamgt4 »

Hello, I am having the same problem. Did you ever find a resolution?
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

What happens when you run zmaudit.pl manually as root?

If disk space is at a level when things should be deleted, and zmaudit deletes a lot when you run it, doesn't look like it's being scheduled properly by zm.

You then have two choices;

Use cron as root to schedule a manual run of zmaudit every 10 to 60 minutes.

Find out why zm isn't calling it itself, and the answer will probably be in zoneminder's option settings.
grndamgt4
Posts: 24
Joined: Tue Oct 13, 2009 5:05 pm

Post by grndamgt4 »

Flash_ wrote:What happens when you run zmaudit.pl manually as root?

If disk space is at a level when things should be deleted, and zmaudit deletes a lot when you run it, doesn't look like it's being scheduled properly by zm.

You then have two choices;

Use cron as root to schedule a manual run of zmaudit every 10 to 60 minutes.

Find out why zm isn't calling it itself, and the answer will probably be in zoneminder's option settings.
Hello and thanks for the reply, when I execute a filter to delete events in the web UI, they do not visually get deleted. I then run zmaudit.pl and it has no output (nor does zmaudit.log).

If I go back to that same filter window with the results showing, check each of the events on that page and hit delete, they visually get deleted.
Then if I run zmaudit.pl it deletes those events.

So zmaudit.pl seems to be working but the problem is only with executing a filter that should delete events as it doesn't seem to actually remove the event from the DB.

Any other suggestions?
Locked