docker_exporter

command module
v0.0.0-...-3a62da2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 10 Imported by: 0

README

Docker Exporter for Prometheus

This Go application exports Docker container metrics for Prometheus monitoring.

Features

  • Collects metrics such as CPU, memory, disk, and network usage for Docker containers.
  • Exposes metrics in Prometheus format for monitoring and alerting.

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/docker-exporter.git

build the application

  1. cd docker-exporter
  2. go mod tidy
  3. go build

Usage

  1. run the exporter
./docker-exporter

The exporter will start collecting Docker container metrics and expose them on http://localhost:8815/metrics.

Add the Metrics endpoint to Prometheus

scrape_configs:
  - job_name: 'docker-exporter'
    static_configs:
      - targets: ['localhost:8815']
Restart Prometheus to apply the configuration changes.

Access Prometheus web UI (http://localhost:9090) and query the Docker Exporter metrics.
Metrics

The Docker Exporter exposes the following metrics:

container_status: Status of the Docker container (0 = created, 1 = running, 2 = stopped)
disk_utilization: Disk utilization of the Docker container in kB/s
memory_usage: Memory usage of the Docker container in MB
network: Network usage of the Docker container in Mbps
cpu_utilization: CPU utilization of the Docker container in %

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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