Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

docker-archive/infra-container_exporter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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"...

About

Prometheus exporter exposing container metrics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages