zmaudit error in log

Forum for questions and support relating to the 1.29.x releases only.
Locked
kkarrZM2
Posts: 1
Joined: Thu Jul 21, 2016 4:27 am

zmaudit error in log

Post by kkarrZM2 »

Hello everyone,

It appears that I am getting a general zmaudit error in my log file every so often when I assume the zmaudit.pl tries to run.

Sure enough I have been having issues with my filters not running correctly and my disk ends up getting filled up to the point that the database crashes due to running out of space.

I then have to manually go in and remove files or try to delte database entries and "babysit" the system back to operation again.

What would cause the zmaudit.pl not to run properly ? Is there something I can check as far as permissions etc ?

Also, running the zmaudit.pl from root permissions on the command line into the server works fine....

Thanks
gerdesj
Posts: 19
Joined: Wed Jan 14, 2015 4:00 pm

Re: zmaudit error in log

Post by gerdesj »

Hmm, where to start? I'll assume you are running 1.29 because you are posting here. What distro are you using? Is you ZM compiled from source or from a package?

Firstly, you should treat your IT a bit better and not allow a system to run out of disc space - ever. Obviously I never do - honest 8) I recommend that you get some form of monitoring in place that will notify you in advance of problems. <10% free space on a filesystem should be considered a critical condition, regardless of how large it is. Having said that most people will go for 5% as critical and 10% as warning. There are loads of monitoring utilities. Nagios/Icinga are probably a bit excessive for a smaller set up but something like "munin" would probably be worth investigating or for just disc space a simple script on a cronjob would do the trick.

You may not be aware that MySQL/MariaDB will chew up disc space for its binary logs by default. ZM does not do a huge number of DB changes but it can have an effect. Investigate adding something like this to /etc/mysql/my.conf

Code: Select all

[mysqld]
expire_logs_days        = 10
max_binlog_size         = 100M
You should also look into how to analyze/fix your database now that it has been in an out of space condition, several times.

This command will attempt to fix all problems. I should say that I, my family, my friends, associates and anyone who has ever spoken the word "zoneminder" will not condone running a command that you have seen on the internet without understanding the ramifications. It assumes that you are running as root and that root has a valid MySQL password. To be honest it has never broken anything for me, ever. You will have suitable backups in place anyway and protect any persons of nervous disposition.

Code: Select all

#mysqlcheck -p -A --auto-repair
Now we get to your actual, reported fault. Answers to the above questions first, please.

Cheers
Jon
Locked