Sign inSign up

merijntjetak/es2graphite

By merijntjetak

Updated about 6 years ago

Collect statistics from Elasticsearch and send them to Graphite.

Image
0

367

merijntjetak/es2graphite repository overview

merijntjetak/es2graphite

This docker image runs the es2graphite data collector. es2graphite will get data from Elasticsearch and push it to graphite.

Usage

Example usage:

docker run -e GRAPHITE_HOST=192.0.2.1 \
           -e GRAPHITE_PORT=2003 \
           -e ES_HOST=192.0.2.2 \
           merijntjetak/es2graphite

Options are set through environment variables, the following variables are available:

Environment variableDescription
GRAPHITE_HOSTGraphite host to connect to (default: localhost)
GRAPHITE_PORTGraphite port to connect to (default: 2003)
ES_HOSTElasticsearch host to connect to (default: localhost)
ES_PORTElasticsearch port to connect to (default 9200)
PROTOCOLGraphite protocol to use (plaintext(default) or pickle)
LOGLEVELLogging level (debug, info, warn, error(default))
HEALTHLEVELLevel of health metrics (cluster(default), indices, shards)
INTERVALInterval between polls (default: 60)

Development

The make.sh script is available for building, running and publishing the image. When using the script, make sure to update the variables in the top section.

Ansible

The image can easily be deployed through Ansible. Use the following code snippet as an example to deploy the image:

- name: Start es2graphite
  docker_container:
    name: es2graphite
    state: started
    restart_policy: unless-stopped
    image: "merijntjetak/es2graphite"
    network_mode: host
    env:
      GRAPHITE_HOST: "{{ hostvars[groups['graphite'][0]]['ansible_eth0']['ipv4']['address'] }}"
      GRAPHITE_PORT: "{{ graphite_port }}"
      ES_HOST: "{{ hostvars[groups['elasticsearch'][0]]['ansible_eth0']['ipv4']['address'] }}"
      ES_PORT: "{{ elasticsearch_port }}"

Acknowledgement

Development of this component was sponsored by Liberty Global B.V. (www.libertyglobal.com). The es2graphite source can be found at: https://github.com/mattweber/es2graphite.

Tag summary

Content type

Image

Digest

Size

19.5 MB

Last updated

about 6 years ago

docker pull merijntjetak/es2graphite