Push Graylog metrics into Graphite

Push Graylog metrics into Graphite


View on Github
Open Issues

Pushing monitoring data into Graphite

The Python scripts in this repository should help you on your way:

  • elasticsearch_clusterhealth.py
  • elasticsearch_indexes.py
  • graylog_notifications.py
  • graylog_throughput.py


This script grabs the health status from Elasticsearch and transforms the string value to an integer (as Graphite can’t handle strings):

  • green = 0
  • yellow = 1
  • red = 2

It also transforms the boolean value of timed_out to 0 or 1


This script grabs and rewrites index data metrics from Elasticsearch. one of the issues between elastic and Graylog is the orientation; where elastic messages are language oriented (cluster status green), Graphite can’t handle anything but integers, therefor we rewrite a bunch of entries so we can make sense of it (in Grafana).

The data we push into Graphite:

  • total number of indices
  • number of green (ok) indices
  • number of yellow (impaired) indices
  • number of red (errro) indices
  • number of messages
  • deleted documents
  • total store size in bytes
  • total store size in gigabytes
  • total store size in megabytes
  • primary store size in bytes
  • primary store size in gigabytes
  • primary store size in megabytes
  • replica store size in bytes
  • replica store size in gigabytes
  • replica store size in megabytes
  • primary shards
  • replica shards


A script that grabs the number of current notifications from a graylog node and pushes the integer value into Graylog.

Nothing too special


Grabs the Graylog throughput (number of messages) and pushes it into Graphite so you can unleash all kinds of funky graphs, through Grafana too!

All files contain the necessary information to get you going!