Skip to content

Instantly share code, notes, and snippets.

@dpetzel dpetzel/gist:1885932
Created Feb 22, 2012

What would you like to do?
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 =, evt.summary)
if m and'app_name'):
new_summary = "".join(['app_name'), " - ",
"Unable to establish JMX Connection"
evt.summary = new_summary
#Additionally The eventKey, which is part of thed de-dupe hash
# contains the data point. Lets crush that as well for a better
# hit rate
evt.eventKey ='app_name')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.