diff --git a/src/analyzer/analyzer.py b/src/analyzer/analyzer.py index 51bf4d95..22ee7e1e 100644 --- a/src/analyzer/analyzer.py +++ b/src/analyzer/analyzer.py @@ -221,6 +221,14 @@ def run(self): # Log to Graphite self.send_graphite_metric('skyline.analyzer.run_time', '%.2f' % (time() - now)) self.send_graphite_metric('skyline.analyzer.total_analyzed', '%.2f' % (len(unique_metrics) - sum(exceptions.values()))) + self.send_graphite_metric('skyline.analyzer.total_anomalies', '%d' % len(self.anomalous_metrics)) + self.send_graphite_metric('skyline.analyzer.total_metrics', '%d' % len(unique_metrics)) + for key, value in exceptions.items(): + send_metric = 'skyline.analyzer.exceptions.%s' % key + self.send_graphite_metric(send_metric, '%d' % value) + for key, value in anomaly_breakdown.items(): + send_metric = 'skyline.analyzer.anomaly_breakdown.%s' % key + self.send_graphite_metric(send_metric, '%d' % value) # Check canary metric raw_series = self.redis_conn.get(settings.FULL_NAMESPACE + settings.CANARY_METRIC) diff --git a/src/settings.py.example b/src/settings.py.example index 5a65a1f0..77039e6b 100644 --- a/src/settings.py.example +++ b/src/settings.py.example @@ -209,8 +209,11 @@ MAX_RESOLUTION = 1000 # in Skyline. The Listener will check to see if each incoming metrics # contains anything in the skip list. It is generally wise to skip entire # namespaces by adding a '.' at the end of the skipped item - otherwise -# you might skip things you don't intend to. +# you might skip things you don't intend to. For example the default +# skyline.analyzer.anomaly_breakdown. which MUST be skipped to prevent crazy +# feedback. SKIP_LIST = [ + 'skyline.analyzer.anomaly_breakdown.', 'example.statsd.metric', 'another.example.metric', # if you use statsd, these can result in many near-equal series