This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# Lets try and reduce noise here. Since services have multiple | |
# JMX data sources, we really don't need multiple events for each data source | |
# A single event should do the trick. We are going to normalize the summary | |
# so that dedupe rules kick in | |
re_string = "^DataSource\s(?P<app_name>.*?)\s.*?;\serror connecting to server" | |
if getattr(evt, "summary", "") != "": | |
m = re.search(re_string, evt.summary) | |
if m and m.group('app_name'): | |
new_summary = "".join([m.group('app_name'), " - ", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if device: | |
if device.getSnmpStatusString() != "Up": | |
#Preserve the actual SNMP agent down message | |
if getattr(evt, "summary", "") != "SNMP agent down": | |
evt._action = "drop" |
NewerOlder