GithubHelp home page GithubHelp logo

isabella232 / operations-software-druid_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fullcontact/operations-software-druid_exporter

0.0 0.0 0.0 38 KB

This is a mirror from https://gerrit.wikimedia.org. See https://www.mediawiki.org/wiki/Developer_access for contributing.

License: Apache License 2.0

Python 100.00%

operations-software-druid_exporter's Introduction

Prometheus exporter for Druid (http://druid.io/)

Collects HTTP POST JSON data coming from Druid daemons and expose them formatted following the Prometheus standards.

Running

The easiest way to run druid_exporter is via a virtualenv:

  virtualenv .venv
  .venv/bin/python setup.py install
  .venv/bin/druid_exporter

By default metrics are exposed on TCP port 8000. Python 2 is not supported.

Druid versions supported

This exporter is tested and used by the Wikimedia foundation with Druid version 0.11.0, so it might not work as expected for newer versions.

How does it work?

Druid can be configured to emit metrics (JSON data) to a HTTP endpoint configured via the following runtime properties:

http://druid.io/docs/0.11.0/configuration/index.html#http-emitter-module

The druid prometheus exporter accepts HTTP POST data, inspects it and stores/aggregates every supported datapoint into a data structure. It then formats the data on the fly to Prometheus metrics when a GET /metrics is requested.

This exporter is supposed to be run on each host running a Druid daemon.

Supported metrics and labels

Broker, Historical (histograms)

  • query/time [datasource]
  • query/bytes [datasource]
  • query/cache/total/numEntries
  • query/cache/total/sizeBytes
  • query/cache/total/hits
  • query/cache/total/misses
  • query/cache/total/evictions
  • query/cache/total/timeouts
  • query/cache/total/errors

Historical, Coordinator (counters)

  • segment/max [datasource]
  • segment/count [datasource]

Historical (counters)

  • segment/used [datasource]
  • segment/scan/pending

Coordinator (counters)

  • segment/assigned/count [tier]
  • segment/moved/count [tier]
  • segment/dropped/count [tier]
  • segment/deleted/count [tier]
  • segment/unneeded/count [tier]
  • segment/overShadowed/count
  • segment/loadQueue/failed [server]
  • segment/loadQueue/count [server]
  • segment/dropQueue/count [server]
  • segment/size [datasource]
  • segment/unavailable/count [datasource]
  • segment/underReplicated/count [datasource, tier]

Peon (counters)

  • query/time [datasource]
  • query/bytes [datasource]
  • ingest/events/thrownAway [dataSource]
  • ingest/events/unparseable [dataSource]
  • ingest/events/processed [dataSource]
  • ingest/rows/output [dataSource]
  • ingest/persists/count [dataSource]
  • ingest/persists/failed [dataSource]
  • ingest/handoff/failed [dataSource]
  • ingest/handoff/count [dataSource]

Realtime metrics have been tested only when emitted by Peons, since the Wikimedia use case (for the moment) is to use Tranquillity rather than Real Time nodes or the Kafka Indexing Service.

Please check the following document for more info: http://druid.io/docs/0.11.0/operations/metrics.html

The JVM metrics are currently not supported, please check other projects like https://github.com/prometheus/jmx_exporter if you need to collect them.

Known limitations

When a Druid cluster is running with multiple coordinators or overlords, only one of them acts as leader and the others are in standby mode. From the metrics emission point of view, this means that only the daemon acting as leader emits druid metrics, the others don't (except for metrics like Jetty ones). This has caused some confusion in our day to day operations, since when a coordinator or a overlord leader looses its status in favor of another one (for example due to a restart) it stops emitting metrics, and the Prometheus exporter keeps reporting the last known state. This might be confusing to see at first (expecially if metrics are aggregated) so the current "fix" is to restart the Druid Prometheus exporter when a coordinator or a overlord leader are restarted. Future versions of this project might contain a fix, pull requests are welcome!

operations-software-druid_exporter's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.