Author Topic: Clues for event handler to send email  (Read 2651 times)

bp5

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
Clues for event handler to send email
« on: August 28, 2010, 09:44:16 pm »
Can anyone give me some clues as to how I can write some simple event handlers? I'm guessing that using the Respond to Events Wizard with Advanced Events is the way to go and I've managed to put up an alert on an orbiter when a PIR is tripped, but I can't do anything beyond that. For example, I'd like to send an e-mail when there is a Security Breach.

I'm guessing I start with choosing "Security Breach" as the event, and the device " =  CORE" and then I've tried looking at what the Advanced Wizard offers but there I'm stumped. I've looked at the wiki, and I've seen references to executing a command group but can't figure out how to define a command group anywhere.  Any guidance gratefully received...

cheers,
Blaine

bp5

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
Re: Clues for event handler to send email
« Reply #1 on: August 29, 2010, 04:44:59 pm »
OK, I found this in the tutorial sections:
http://wiki.linuxmce.org/index.php/Email_0810

but duplicating it and clicking Test Command didn't seem to send email and the DCERouter.log didn't show any evidence of trying...

bp5

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
Re: Clues for event handler to send email
« Reply #2 on: September 01, 2010, 06:25:51 pm »
OK, I now have e-mail being sent when there is a security breach. First I did Email Setup under the Basic Info wizard and used my Gmail.com account (tried my google apps account which is really gmail, but that didn't work). It sent me a test message.

Then I used the example in the tutorial, but chose the Event "Security Breach" and device = "Security Plug In".  I now get 2 e-mails for each of these e-mail events despite there being only one item in the list, still, better than none. I'd like to be able to configure the e-mails more to include more info (like when the alarm is disarmed who the user was). Does anyone know where I can edit this sort of thing from bash?

cheers,
Blaine