docker-exporter

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 2 Imported by: 0

README

docker exporter

Go Report Card

Simple and lightweight Prometheus exporter for docker container metrics.

Prerequisites

Installation

Using Docker

The exporter is available as a Docker image. You can run it using the following example:

$ docker run \
  -p 8080:8080 \
  ghcr.io/davidborzek/docker-exporter:latest
Prometheus config

Once you have configured the exporter, update your prometheus.yml scrape config:

scrape_configs:
  - job_name: "docker_exporter"
    static_configs:
      - targets: ["localhost:8080"]
Config
Flag Description Default Value Environment Variable
--port The port of docker exporter server. 8080 DOCKER_EXPORTER_PORT
--host The host of docker exporter server. DOCKER_EXPORTER_HOST
--auth-token Optional auth token for the docker exporter server. If no token is set authentication is disabled. DOCKER_EXPORTER_AUTH_TOKEN
--log-level Log level for the exporter. info DOCKER_EXPORTER_LOG_LEVEL
Exported Metrics

Currently the exporter exports all numeric and boolean states of a sensor into its own gauge:

Metric Name Description Labels
docker_container_block_io_read_bytes Block I/O read bytes total name
docker_container_block_io_write_bytes Block I/O write bytes total name
docker_container_cpu_usage_percentage CPU usage in percentage name
docker_container_info Infos about the container name, image_name, image
docker_container_memory_total_bytes Total memory in bytes name
docker_container_memory_usage_bytes Memory usage in bytes name
docker_container_memory_usage_percentage Memory usage in percentage name
docker_container_network_rx_bytes Network received bytes total name, network
docker_container_network_rx_dropped_packets Network dropped packets total name, network
docker_container_network_rx_errors Network received errors name, network
docker_container_network_rx_packets Network received packets total name, network
docker_container_network_tx_bytes Network sent bytes total name, network
docker_container_network_tx_dropped_packets Network dropped packets total name, network
docker_container_network_tx_errors Network sent errors name, network
docker_container_network_tx_packets Network sent packets total name, network
docker_container_pids_current Current number of pids name
docker_container_state State of the container name, state
docker_container_uptime Uptime of the container name

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
mock
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL