Git Product home page Git Product logo

rancher-prometheus-config's Introduction

A prometheus confd setup that automatically extracts all metrics of containers using labels. No configuration needed.

Just launch a new Stack in rancher.

Build

docker build -t marcbachmann/rancher-prometheus-config:1.0.3 .

Usage

  1. Run container as sidekick in rancher
  2. Mount volumes of sidekick into prometheus server
docker run -d --name prometheus-config marcbachmann/rancher-prometheus-config
docker run -d --volumes-from prometheus-config --name prometheus prom/prometheus -config.file=/etc/prometheus/prometheus.yml

Add a prometheus exporter to the config

This is quite easy, you can add new exporters based on labels on services, just configure it using the labels. All the labels are optional.

  • prometheus.port, based on that we enable the exporter

  • prometheus.job_name, optional

  • prometheus.metrics_path

  • prometheus.scrape_interval

  • prometheus.scrape_timeout

  • prometheus.label.foo, to add a label foo to all metrics of that exporter

  • prometheus.metric_relabel_pattern, only supports cadvisor and node and blackbox. cadvisor adds container_id, service_stack, service_name, instance (host_ip) labels to it's metrics based on the rancher labels.

    node adds instance (host ip), host_labels_*, host_name labels to all metrics

What to do

  • Improve the relabeling of the node exporter. Add host labels onto node_last_seen or node_boot_time events

rancher-prometheus-config's People

Contributors

marcbachmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rancher-prometheus-config's Issues

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.