Open Sourced: Anodot-Metrics-Bridge

Tzach Zohar
skai engineering blog
3 min readJun 12, 2017

The ability to know when something’s wrong before it impacts your business is key to a company’s success and agility. When the cost of mistakes can be bound, the pace of innovation increases. In this post I’ll share Kenshoo’s monitoring journey with Graphana, Drowpizard Metrics and Anodot, and our latest open-sourced library that combines these powerful tools together.

For us at Kenshoo, one of the first steps towards proactive monitoring was adopting Dropwizard (ex Codahale) Metrics library (in conjunction with Graphite and Grafana), to constantly measure, report, and display everything that was going on within any JVM-based application.

These tools are completely decoupled but work very well together: Metrics is Java a library that provides an in-memory registry of metrics which are updated continuously, and reported using various different reporters; One of these reporters is the GrpahiteReporter, which periodically sends the current values of all metrics into Graphite. Graphite stores the resulting time-series for each metric, and Grafana provides flexible graphing abilities over this data:

The standard Metrics + Graphite + Grafana setup

This powerful combination of open-source tools makes it easy to detect trends, issues, workloads, usage patterns — pretty much anything that can be displayed as a numeric time-series. For the last 4 years or so, each of our services was created with an accompanying rich dashboard showing everything there is to know about its current state:

A typical Kenshoo Grafana Dashboard

Recently, we’ve added a powerful component to our proactive monitoring abilities: Anodot, which automatically detects anomalies in time-series data, and sends alerts if they reach certain significance. Sophisticated anomaly detection can replace the coarse use of static thresholds (which are usually inaccurate and are created after the first time an issue is encountered) with smarter significance measurements that calibrate themselves based on historical data.

The immediate question was:

Can we report all of our existing Metrics data into Anodot (in addition to Graphite), to get immediate, real-time insights into all of our existing key metrics?

And the immediate answer was… not quite; Anodot’s metric naming is significantly different than Metrics’, and Anodot’s supplied library did not bridge that gap.

And that’s exactly why we wrote Anodot-Metrics-Bridge. Anodot-Metrics-Bridge is an easy-to-use, light-weight library that converts your existing Metrics registries into AnodotRegistries, which can then report into your Anodot account.

Side-by-side reporting of all metrics into both Graphite and Anodot, using Anodot-Metrics-Bridge

Usage of Anodot-Metrics-Bridge is as easy as:

(There’s lot’s more, check out the README for full details!)

Seeing that this integration was helpful, we’ve decided to open-source it — feel free to use, discuss, or contribute anything you find useful. We’d be happy to see more Anodot users being able to harness their Metrics data in real time.

--

--

Tzach Zohar
skai engineering blog

System Architect. Functional Programming, Continuous Delivery and Clean Code make me happier. Mutable state and for loops make me sad.