Git Product home page Git Product logo

infra-container_exporter's Introduction

DEPRECATED

Please use cAdvisor

Container Exporter

Prometheus exporter exposing container metrics.

The container-exporter requests a list of containers running on the host by talking to a container manager. Right now, Docker as container manager is supported. It then gathers various container metrics by using libcontainer and DockerClient and then exposes them for prometheus' consumption.

Run it as container

docker run -p 9104:9104 -v /sys/fs/cgroup:/cgroup \
           -v /var/run/docker.sock:/var/run/docker.sock prom/container-exporter

Support for labels

Specify all Docker label whose values you would like to tag your Prometheus metrics with by using the -labels parameter to the container exporter binary (or docker container). For example if you have a container labeled with LabelA and LabelB and a second container labeled with LabelB and LabelC as shown below. You can launch container exporter with the parameter -labels=LabelA,LabelB,LabelC.

docker run --name ContainerA --label LabelA=ValueA --label LabelB=ValueB [IMAGE] 
docker run --name ContainerB --label LabelB=ValueB --label LabelC=ValueC [IMAGE] 
docker run -p 9104:9104 -v /sys/fs/cgroup:/cgroup \
           -v /var/run/docker.sock:/var/run/docker.sock prom/container-exporter -labels=LabelA,LabelB,LabelC

This will load to the metrics shown below. Note that an empty string is reported for any container that does not define a label that is specified to container exporter.

container_cpu_throttled_periods_total{LabelA="ValueA",LabelB="ValueB",LabelC="",name="ContainerA"...
container_cpu_throttled_periods_total{LabelA="",LabelB="ValueB",LabelC="ValueC",name="ContainerB"...

infra-container_exporter's People

Contributors

ashmere avatar discordianfish avatar se77en avatar usmanismail avatar xbglowx avatar

Watchers

 avatar  avatar

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.