Discussion:
Stop notifications for cleared by user action?
Chris Smith
2013-07-17 19:19:46 UTC
Permalink
Chris Smith [http://community.zenoss.org/people/csmith] created the discussion

"Stop notifications for cleared by user action?"

To view the discussion, visit: http://community.zenoss.org/message/74026#74026

--------------------------------------------------------------
Been searching around for awhile and was unable to find anyone else asking the same question. Is there a way to block notifications for alarms cleared by user action (me?) but still retain real clear notifications?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74026#74026]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Chris Smith
2013-07-18 16:08:34 UTC
Permalink
Chris Smith [http://community.zenoss.org/people/csmith] created the discussion

"Re: Stop notifications for cleared by user action?"

To view the discussion, visit: http://community.zenoss.org/message/74035#74035

--------------------------------------------------------------
Bump - hope someone has an idea :/
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74035#74035]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Rob Eagle
2013-07-19 12:46:55 UTC
Permalink
Rob Eagle [http://community.zenoss.org/people/reagle] created the discussion

"Re: Stop notifications for cleared by user action?"

To view the discussion, visit: http://community.zenoss.org/message/74056#74056

--------------------------------------------------------------
Chris,
I currently use a notification command to parse out if which of the 3 clear types there are and only send on system clear vs age/user and then send an email to addresses specified in the notification itself (does not use users in zenoss).
If you are interested, I can post the notification script.  It is pretty legnthy but works.
--Rob
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74056#74056]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Chris Smith
2013-07-19 13:26:14 UTC
Permalink
Chris Smith [http://community.zenoss.org/people/csmith] created the discussion

"Re: Stop notifications for cleared by user action?"

To view the discussion, visit: http://community.zenoss.org/message/74057#74057

--------------------------------------------------------------
Rob - I would appreciate that. I'm kind of disappointed that there isn't a simple solution but I'd definitely like to try it out. Are you not using Zenoss notifications at all? Or just not using it for cleared alarms?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74057#74057]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Rob Eagle
2013-07-22 13:08:52 UTC
Permalink
Rob Eagle [http://community.zenoss.org/people/reagle] created the discussion

"Re: Stop notifications for cleared by user action?"

To view the discussion, visit: http://community.zenoss.org/message/74082#74082

--------------------------------------------------------------
Chris,
No, we don't use email notifications at all, unless just testing a triggers.  Couple reasons - Don't want to have to store our multiple emails in zenoss along with a user and at some point these same scripts will be used to lookup the responsible party of a device and grab the email from our user/asset database at time of incident.

Attaching both scripts since you would need both to succesfully implement a command notification (excuse the lack of great syntax and static args, fairly new w/python):

Command:
python /home/zenoss/triggers/EmailTrigger.py " mailto:***@yourdomain.com ***@yourdomain.com" "${evt/lastTime}" ${urls/eventUrl} ${urls/eventsUrl} ${evt/device} ${evt/summary} ${evt/message} ${evt/severity} ${evt/component}

Clear Command:
python /home/zenoss/triggers/EmailClearTrigger.py " mailto:***@yourdomain.com ***@yourdomain.com" "${evt/clearid}" "${evt/stateChange}" ${evt/device} ${clearEvt/summary} ${evt/message} ${evt/severity} ${evt/eventState} ${evt/component}

Your will need to change any yourdomain references in script and commands.   The yourdomain in the command is for the To recipient of the email.  You will also need to specify your smtp gateway in the script.
Hope this helps and if anyone out there would like to further develop this script to add any aurguments (or anything) please post it back here, I would appreciate the help.
--Rob
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74082#74082]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Rob Eagle
2013-08-01 13:48:38 UTC
Permalink
Rob Eagle [http://community.zenoss.org/people/reagle] created the discussion

"Re: Stop notifications for cleared by user action?"

To view the discussion, visit: http://community.zenoss.org/message/74266#74266

--------------------------------------------------------------
Chris,
Sorry supplied version doesn't seem to work with 4.2.3.  After some re-work, this seems to work on 4.2.3:
Command:
/home/zenoss/triggers/EmailTrigger.sh -t email -T ${evt/lastTime} -E ${urls/eventUrl} -U ${urls/eventsUrl} -D ${evt/device} -S ${evt/summary} -M ${evt/message} -s ${evt/severity} -c ${evt/component}
Clear Command:
/home/zenoss/triggers/EmailClearTrigger.sh -t email -i "${evt/clearid}" -T ${evt/stateChange} -D ${evt/device} -S ${clearEvt/summary} -M ${evt/message} -s ${evt/severity} -C ${evt/eventState} -c ${evt/component}

Just change email to 1 or more comma seperated email address in the above commands and in the py files the from/cc emails and smtp gateway.
--Rob
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74266#74266]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...