notify email recipient on error
-
- Posts: 360
- Joined: Sun Jun 05, 2016 2:53 pm
notify email recipient on error
Is there a way to make ZM send me an email when an error is encountered? I tried to write a filter and cant seem to find anything about error conditions.....
Re: notify email recipient on error
I use a program called logcheck to send me any errors that get logged to syslog. Then set ZM to log warnings to syslog. Works for me.
Re: notify email recipient on error
Can you be more specific on what kind of error/where the error is supposed to be coming from?
-
- Posts: 360
- Joined: Sun Jun 05, 2016 2:53 pm
Re: notify email recipient on error
Im talking about an error that appears in the ZM log. Logcheck eventually sends me the entire log, 12 hours worth twice a day, but I was trying to get ZM (or something else) to notify me with an email message whenever a particular log event occurs within ZM. I would like to get an immediate notification for
Code: Select all
8/28/24, 5:48:28 PM EDT web_php 1189091 WAR Login denied for user "XXXX"
Code: Select all
9/2/24, 4:04:35 AM EDT zmc_m4 1126489 ERR Unable to open input rtsp://10.1.1.158:554/cam/realmonitor?channel=1&subtype=0 due to: Connection refused zm_ffmpeg_camera.cpp 368
If logcheck can do this, I dont know how to configure it.
Re: notify email recipient on error
If there isn't a way to do that inside Zoneminder, then I'd be watching e.g. /var/log/zm/zm.log with a separate process, and watching for your key phrases to come up -- e.g. using "tail -f" to follow the end of the log and "grep -e 'Login denied for user' -e 'Another error' -e 'And Another error'" to pick off specific messages or reg-exps of messages.
Re: notify email recipient on error
Cron and grep works for me:
https://wiki.zoneminder.com/SMS_Notific ... _HDD_Fails
It's somewhat unfortunate to say that ZM needs monitoring scripts in order to run, as things are always breaking, but I don't know how it can be built into ZM without being more bloat. Maybe there can be optional shell scripts that are included in /usr/share/zoneminder. I've just made my own over time. Or you can use dedicated monitoring software but that has its own learning curve.
https://wiki.zoneminder.com/SMS_Notific ... _HDD_Fails
It's somewhat unfortunate to say that ZM needs monitoring scripts in order to run, as things are always breaking, but I don't know how it can be built into ZM without being more bloat. Maybe there can be optional shell scripts that are included in /usr/share/zoneminder. I've just made my own over time. Or you can use dedicated monitoring software but that has its own learning curve.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide