Giter Site home page Giter Site logo

infra-prometheus-consul's Introduction

THIS IS DEPRECATED

Prometheus now has native consul support which is the better option than using this docker image.

prometheus-consul

This Docker image run prometheus along with consul-template to update the prometheus config. It adds job, if found, for the following services:

  • prometheus-node-exporter
  • prometheus-container-exporter
  • prometheus-haproxy-exporter
  • prometheus-cloudwatch-exporter
  • prometheus-pushgateway
  • prometheus-alertmanager

It requires the services to have a tag which will be added as label to the job.

As the parent image prom/prometheus, this image stores the metrics in a volume at /prometheus. It's advised to use a data volume container to persist the metrics when updating the image:

$ docker run --name prometheus-data -v /prometheus busybox true
$ docker run --volumes-from prometheus-data dckr/prometheus-consul ...

This way you can remove and recreate the prometheus container while keeping the metrics around.

Configuration

You can pass consul-template parameters directly to the image like this:

$ docker run dckr/prometheus-consul -consul consul:8500

Yo pass command line arguments to prometheus, you can set them via the PROMETHEUS_OPTS env variable:

$ docker run -e PROMETHEUS_OPTS="-alertmanager.url=http://alarm:9095" \
             -p 9090:9090 dckr/prometheus-consul -consul consul:8500

To customize the config template itself or the console templates, create a new directory with the following files (all optional):

./prometheus.conf.tmpl: the prometheus config consul template
./prometheus/consoles: prometheus console templates
./prometheus/console_libraries: prometheus console libraries

Now create a Dockerfile with only FROM dckr/prometheus-consul in it. Building this image will replace the provided template with the templates in your directory.

infra-prometheus-consul's People

Contributors

ajohnstone avatar discordianfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

infra-prometheus-consul's Issues

Issue with reloading configuration - restart rather than reload configuration

The restart of the service should use SIGHUP and not restart the service entirely.

sv restart

restart
Send the commands term, cont, and up to the service, and wait up to 7 seconds for the service to restart. Then report the status or timeout. If the script ./check exists in the service directory, sv runs this script to check whether the service is up and available again; it’s considered to be available if ./check exits with 0.

https://github.com/docker-infra/prometheus-consul/blob/master/consul-template/run#L4

See prometheus documentation for handling configuration reloads.

http://prometheus.io/docs/operating/configuration/

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.