Skip to content

Simple utility to export Docker container running state as Prometheus metrics

License

Notifications You must be signed in to change notification settings

NullOranje/docker-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-exporter

Simple application to expose Docker container running state as Prometheus metrics.

By default, exposes metrics on all interfaces, port 12345

Building

As standalone

From the source directory, run go build

As container

From the source directory, run docker build -t docker-exporter .

Running

As standalone

No configuration is required; run the binary on the local machine.

As container

There are two key things here: mounting the Docker daemon socket to the container and exposing the Prometheus metrics endpoint

Because Docker does not give access to information out of the box, we can override values via environment variables.

  • HOSTNAME allows us to override the host found in os.Hostname()

About

Simple utility to export Docker container running state as Prometheus metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published