Skip to content

Commit

Permalink
skyline.analyzer.metrics
Browse files Browse the repository at this point in the history
Added functionality to analyzer.py for skyline to feed all of its own metrics
back to graphite.  This results in skyline analyzing its own metrics for free :)
The resultant graphite metrics and carbon files (if using whisper and not ceres)
that this provides are (e.g):
skyline/
├── analyzer
│   ├── anomaly_breakdown
│   │   ├── first_hour_average.wsp
│   │   ├── grubbs.wsp
│   │   ├── histogram_bins.wsp
│   │   ├── ks_test.wsp
│   │   ├── least_squares.wsp
│   │   ├── mean_subtraction_cumulation.wsp
│   │   ├── median_absolute_deviation.wsp
│   │   ├── stddev_from_average.wsp
│   │   └── stddev_from_moving_average.wsp
│   ├── duration.wsp
│   ├── exceptions
│   │   ├── Boring.wsp
│   │   └── Stale.wsp
│   ├── projected.wsp
│   ├── run_time.wsp
│   ├── total_analyzed.wsp
│   ├── total_anomalies.wsp
│   └── total_metrics.wsp
└── horizon
    └── queue_size.wsp
There will be more for other exceptions and any further added algorithms, this
is however quite trivial in terms of whisper storage and new metrics adds.
Modified:
src/analyzer/analyzer.py
  • Loading branch information
earthgecko committed Jun 10, 2014
1 parent b32eb9a commit 8565049
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

1 comment on commit 8565049

@earthgecko
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be done in src/horizon/roomba.py too - tbd

Please sign in to comment.