Setting up e-mail sending?
-
- Posts: 10
- Joined: Tue Oct 07, 2008 12:38 pm
Setting up e-mail sending?
Hello,
I must do something wrong.. I want the ZM to send me emails when there are some alert. I have setup everything under the email:
I have done one simple event that will send everything to my e-mail just for test, but I dont recive any mails, can i check somewhere if the mail is sent or if something else is wrong? Any options that i have missed?
Really greatful for help, can´t find out what I am doing wrong..
Thanks
//Christian
I must do something wrong.. I want the ZM to send me emails when there are some alert. I have setup everything under the email:
I have done one simple event that will send everything to my e-mail just for test, but I dont recive any mails, can i check somewhere if the mail is sent or if something else is wrong? Any options that i have missed?
Really greatful for help, can´t find out what I am doing wrong..
Thanks
//Christian
-
- Posts: 190
- Joined: Tue Sep 16, 2008 5:22 am
-
- Posts: 10
- Joined: Tue Oct 07, 2008 12:38 pm
-
- Posts: 10
- Joined: Tue Oct 07, 2008 12:38 pm
Each event will only be sent once (there's a flag in the database for "emailed"). But, as far as I can tell there's no reliable way to limit alerts/emails by time (for example, I can't record 50 events per hour but only send one SMS or email every 5 minutes) without using an external piece of code.
That said, there are examples of code like that either in here or in the wiki. I know I've seen it, but I can never find it when I actually sit down and think about implementing something like that.
Another option would be to specify a larger interval between filter runs, and then bake that time delay into the filter. So for example, set ZM_FILTER_EXECUTE_INTERVAL to 300 (run once every 5 minutes), and then limit your filter results to the first 1 result only and put a time restriction that the event must have occurred in the last 5 minutes. But this means your alerts will be delayed by up to 5 minutes (presumably you could have concurrent filters running on the same events, so that you could upload the events to a remote location and *not* limit to the first result).
I have always wanted to write something that sends an SMS based on a filter but only if another SMS hasn't been sent in the last N minutes. Partly cloudy days are hell with respect to my ZM box, because the indoor alarms are always going off and sending me alerts. Limiting the frequency of SMS messages (or emails) could be done with some relatively minor modification to zmfilter.pl. If I get around to it I'm sure I'll post the code here as an effort to give back to the community that has been so helpful.
That said, there are examples of code like that either in here or in the wiki. I know I've seen it, but I can never find it when I actually sit down and think about implementing something like that.
Another option would be to specify a larger interval between filter runs, and then bake that time delay into the filter. So for example, set ZM_FILTER_EXECUTE_INTERVAL to 300 (run once every 5 minutes), and then limit your filter results to the first 1 result only and put a time restriction that the event must have occurred in the last 5 minutes. But this means your alerts will be delayed by up to 5 minutes (presumably you could have concurrent filters running on the same events, so that you could upload the events to a remote location and *not* limit to the first result).
I have always wanted to write something that sends an SMS based on a filter but only if another SMS hasn't been sent in the last N minutes. Partly cloudy days are hell with respect to my ZM box, because the indoor alarms are always going off and sending me alerts. Limiting the frequency of SMS messages (or emails) could be done with some relatively minor modification to zmfilter.pl. If I get around to it I'm sure I'll post the code here as an effort to give back to the community that has been so helpful.
-
- Posts: 10
- Joined: Tue Oct 07, 2008 12:38 pm
-
- Posts: 190
- Joined: Tue Sep 16, 2008 5:22 am
-
- Posts: 10
- Joined: Tue Oct 07, 2008 12:38 pm