hello all,
I am running ZM version 1.23.3. I am trying to setup the e-mail alerts based on filters I have been creating. The first filter I have created I have set to run at 7am via cron. I will pull all the events recorded from 7pm the night before until 7am of the current day. When I submit the filter I recieve events that match the criteria I have specified. However when I execute the filter it does not sent an e-mail. I have run the filter via the command line and the zmfilter log shows [Scanning for events using filter 'Test_Filter']. I am able to send mail via the command line and have tested it with gmail and our local mail server. I will list the step by step process and information below. Thank you for your help and any suggestion is appreciated. If you need any more information regarding my setup let me know. E-mail addresses and some other information have been edited for obvious reasons.
OS: CentOS release 5.2 (Final)
MemTotal: 2012360 kB
Model name: Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz
Name Description Value
ZM_OPT_EMAIL - box is checked
ZM_EMAIL_ADDRESS - Working e-mail address
ZM_EMAIL_SUBJECT - ZoneMinder: Alarm - %MN%-%EI% (%ESM% - %ESA% %EFA%)
ZM_EMAIL_BODY - default ZM body
ZM_OPT_MESSAGE - unchecked
ZM_MESSAGE_ADDRESS - blank
ZM_MESSAGE_SUBJECT - default
ZM_MESSAGE_BODY - default
ZM_NEW_MAIL_MODULES - tried checked and unchecked, currently checked
ZM_EMAIL_HOST - localhost
ZM_FROM_EMAIL - root@boxhostname
ZM_URL - zm url
I have disabled FTP for now but have tested with it on and receive the same results.
My filter is called Test_Filter
Use Filter: Test Filter Save Delete Close
Archive Status equal to Unarchived Only +–
and Monitor ID less than or equal to 12 +–
and Date greater than or equal to -4 day +–
and Time greater than or equal to 1900 +–
and Time less than or equal to 2359 +–
You will notice the day is -4 this is the best day that fit my criteria for testing. Other days had recordings but not within this time frame. Also I have only done the time period of 7pm to 11:59pm I am trying to keep it simple for testing purposes.
Sort by: Date / Time Limit to first results only;
Archive all matches: - Unchecked
Create video for all matches: - Unchecked
Email details of all matches: - Checked
Execute command on all matches: - Unchecked / Blank
Delete all matches: - Unchecked
When I execute this filter using the "execute" button the apache log shows:
<ip> - - [27/Oct/2008:18:28:59 -0400] "GET /index.php?view=events&page=&reload=0&execute=1&action=filter&subaction=&line=&fid=&filter_name=Test_Filter&filter%5Bterms%5D%5B0%5D%5Bobr%5D=
0&filter%5Bterms%5D%5B0%5D%5Battr%5D=Archived&filter%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5Bterms%5D%5B0%5D%5Bval%5D=0&filter%5Bterms%5D%5B0%5D%5Bcbr%5D=0&filter%5Bterms%5D%5B1%5D%5Bcnj%5D=and&
filter%5Bterms%5D%5B1%5D%5Bobr%5D=0&filter%5Bterms%5D%5B1%5D%5Battr%5D=MonitorId&filter%5Bterms%5D%5B1%5D%5Bop%5D=%3C%3D&filter%5Bterms%5D%5B1%5D%5Bval%5D=12&filter%5Bterms%5D%5B1%5D%5Bcbr%5D=0
&filter%5Bterms%5D%5B2%5D%5Bcnj%5D=and&filter%5Bterms%5D%5B2%5D%5Bobr%5D=0&filter%5Bterms%5D%5B2%5D%5Battr%5D=Date&filter%5Bterms%5D%5B2%5D%5Bop%5D=%3E%3D&filter%5Bterms%5D%5B2%5D%5Bval%5D=-4+d
ay&filter%5Bterms%5D%5B2%5D%5Bcbr%5D=0&filter%5Bterms%5D%5B3%5D%5Bcnj%5D=and&filter%5Bterms%5D%5B3%5D%5Bobr%5D=0&filter%5Bterms%5D%5B3%5D%5Battr%5D=Time&filter%5Bterms%5D%5B3%5D%5Bop%5D=%3E%3D&
filter%5Bterms%5D%5B3%5D%5Bval%5D=1900&filter%5Bterms%5D%5B3%5D%5Bcbr%5D=0&filter%5Bterms%5D%5B4%5D%5Bcnj%5D=and&filter%5Bterms%5D%5B4%5D%5Bobr%5D=0&filter%5Bterms%5D%5B4%5D%5Battr%5D=Time&filt
er%5Bterms%5D%5B4%5D%5Bop%5D=%3C%3D&filter%5Bterms%5D%5B4%5D%5Bval%5D=2359&filter%5Bterms%5D%5B4%5D%5Bcbr%5D=0&sort_field=DateTime&sort_asc=1&limit=&auto_email=1&auto_execute_cmd= HTTP/1.1" 200
31004 "http://knox/index.php?view=filter&page= ... 5B0%5D%5Bo
p%5D=%3C&filter%5Bterms%5D%5B0%5D%5Bval%5D=now&sort_field=DateTime&sort_asc=1&limit=&auto_execute_cmd=" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like
Gecko) Version/3.1.2 Safari/525.20.1"
ZMFilter.log shows this:
10/27/2008 18:28:54.971021 zmfilter[32660].INF [Scanning for events using filter 'Test_Filter']
This is the only message I receive from any of the zm log files. I tail all of them using this command
"tail -f zmaudit.log zmdc.log zmfilter.log zm.log zmpkg.log zmupdate.log zmvideo.log zmwatch.log"
The same result is received if I run it from the command line:
# /usr/local/bin/zmfilter.pl -f Test_Filter
These are the listed perl modules I have installed:
# yum list installed | grep perl
perl.i386 4:5.8.8-15.el5_2.1 installed
perl.x86_64 4:5.8.8-15.el5_2.1 installed
perl-Archive-Tar.noarch 1.38-1.el5.rf installed
perl-Archive-Zip.noarch 1.23-1.el5.rf installed
perl-Compress-Zlib.x86_64 1.42-1.fc6 installed
perl-Convert-BinHex.noarch 1.119-2.2.el5.rf installed
perl-DBD-MySQL.x86_64 3.0007-1.fc6 installed
perl-DBI.x86_64 1.605-1.el5.rf installed
perl-Date-Manip.noarch 5.54-1.el5.rf installed
perl-Device-SerialPort.x86_64 1.003001-1.el5.rf installed
perl-Digest-HMAC.noarch 1.01-15 installed
perl-Digest-SHA1.x86_64 2.11-1.2.1 installed
perl-Email-Simple.noarch 2.004-1.el5.rf installed
perl-File-Remove.noarch 1.42-1.el5.rf installed
perl-HTML-Format.noarch 2.04-1.2.el5.rf installed
perl-HTML-Parser.x86_64 3.56-1.el5.rf installed
perl-HTML-Tagset.noarch 3.20-1.el5.rf installed
perl-HTML-Tree.noarch 3.23-1.el5.rf installed
perl-IO-Socket-INET6.noarch 2.51-2.fc6 installed
perl-IO-Socket-SSL.noarch 1.01-1.fc6 installed
perl-IO-Zlib.noarch 1.04-4.2.1 installed
perl-IO-stringy.noarch 2.110-1.2.el5.rf installed
perl-LWP-UserAgent-Determined.noarch 1.03-1.2.el5.rf installed
perl-MIME-Lite.noarch 3.021-1.el5.rf installed
perl-MIME-Types.noarch 1.24-1.el5.rf installed
perl-MIME-tools.noarch 5.420-2.el5.rf installed
perl-Mail-Box.noarch 2.084-1.el5.rf installed
perl-Mail-IMAPClient.noarch 3.11-1.el5.rf installed
perl-Mail-Transport-Dbx.x86_64 0.07-1.el5.rf installed
perl-MailTools.noarch 2.03-1.el5.rf installed
perl-Module-Load.noarch 0.12-1.el5.rf installed
perl-Net-DNS.x86_64 0.59-3.el5 installed
perl-Net-Daemon.noarch 0.43-1.el5.rf installed
perl-Net-IP.noarch 1.25-2.fc6 installed
perl-Net-SSLeay.x86_64 1.30-4.fc6 installed
perl-PHP-Serialization.noarch 0.27-1.el5.rf installed
perl-Parse-RecDescent.noarch 1.94-1.el5.rf installed
perl-PlRPC.noarch 0.2020-1.el5.rf installed
perl-Socket6.x86_64 0.19-3.fc6 installed
perl-String-CRC32.x86_64 1.4-2.fc6 installed
perl-Text-Autoformat.noarch 1.13-1.2.el5.rf installed
perl-Text-Reform.noarch 1.11-1.2.el5.rf installed
perl-TimeDate.noarch 1:1.16-5.el5 installed
perl-URI.noarch 1.35-3 installed
perl-libwww-perl.noarch 5.805-1.1.1 installed
E-mail Alerts: No message created, No message sent
wow awesome the flood of replies is too much for me to handle. Anyway still have not solved the issue. The autoEmail flag is set in the database. I checked all my perl modules and they are correct. In fact to further my testing I took all the information out of the e-mail options setup however left the box checked for allow e-mail on filters. I then ran the same filter as well as setup a new filter and I don't get any errors whats so ever. When I submit other filters and get the results I want and then execute that filter via the command line or web interface they work. It appears that the filter runs, finds what it is looking for but then never creates an e-mail. There is no log of the filter crashing or terminating abnormally. I can send myself emails from the box simply using the mail or sendmail command. I suppose I will just keep plugging away at this. If anyone has any other suggestions to try let me know.
Thanks for the reply. I forgot to mention this filter was for nightly reports of all videos recorded from x time to y time the next day. The filter works however zm does not ever get to the email creation stage. I also had this setup as a cron job to run the filter as I don't want it to constantly run. I do have one other filter called NoDuration and that works perfectly with the "run in background." Once again thanks for looking at my issue.
Similar issue here. My filter is more basic though and set to:
Monitor ID equal to Living_Room
and Cause equal to Motion
Email details of all matches "checked"
When I click on submit I don't see anything happen in /var/log/messages.
When I click on execute it shows this in /var/log/messages:
Jan 1 09:53:47 system-z zmfilter[4942]: INF [Scanning for events using filter '_TempFilter1230821626']
There is no filter with that name defined?
Monitor ID equal to Living_Room
and Cause equal to Motion
Email details of all matches "checked"
When I click on submit I don't see anything happen in /var/log/messages.
When I click on execute it shows this in /var/log/messages:
Jan 1 09:53:47 system-z zmfilter[4942]: INF [Scanning for events using filter '_TempFilter1230821626']
There is no filter with that name defined?
MRD