Skip to content

jeffrysleddens/es-stats

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

es-stats

Reads key cluster metrics from ElasticSearch and writes to Graphite.

Just built, needs thorough testing.

Installation

es-stats has no external dependencies (you're welcome). Assuming Go is installed (built/tested with 1.4.x):

  • go get github.com/jamiealquiza/es-stats
  • go build github.com/jamiealquiza/es-stats

Binary will be found at: $GOPATH/bin/es-stats

Starter Grafana template: https://gist.github.com/jamiealquiza/298575115337fdf03ca5

Usage

Flags:

./es-stats -h
Usage of ./es-stats:
  -graphite-ip="": Destination Graphite IP address
  -graphite-port="2003": Destination Graphite plaintext port
  -interval=30: Metrics polling interval
  -ip="127.0.0.1": ElasticSearch IP address
  -metrics-prefix="elasticsearch": Top-level Graphite namespace prefix (defaults to hostname)
  -port="9200": ElasticSearch port
  -require-master=false: Only poll if node is an elected master

Running:

% ./es-stats -ip="192.168.100.204" -interval=5 -graphite-ip="192.168.100.175" -graphite-port="2013"
2015/03/04 15:27:56 Connected to ElasticSearch: http://192.168.100.204:9200
2015/03/04 15:27:56 Connected to Graphite: 192.168.100.175 port 2013
2015/03/04 15:28:01 Metrics received
2015/03/04 15:28:01 Metrics flushed to Graphite
2015/03/04 15:28:06 Metrics received
2015/03/04 15:28:06 Metrics flushed to Graphite
2015/03/04 15:28:11 Metrics received
2015/03/04 15:28:11 Metrics flushed to Graphite
2015/03/04 15:28:16 Metrics received
2015/03/04 15:28:16 Metrics flushed to Graphite

Get metrics: ScreenShot

Make pretty graphs like: ScreenShot

and: ScreenShot

About

ElasticSearch cluster metrics -> Graphite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%