Sign inSign up

nulloranje/docker-exporter

By nulloranje

•Updated about 7 years ago

Simple utility to export Docker container running state as Prometheus metrics

Image
0

1.4K

nulloranje/docker-exporter repository overview

⁠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()

Tag summary

Content type

Image

Digest

Size

6.9 MB

Last updated

about 7 years ago

docker pull nulloranje/docker-exporter