reverse_exporter

module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: Apache-2.0

README

Build Status Coverage Status Go Report Card

Reverse Prometheus Exporter

Logical-decoding Promethus Metric Reverse Proxy

Purpose

This exporter is designed for appliance-like container environments where multiple Prometheus exporters should be presented as a single "instance" to a Prometheus server.

The reverse_exporter logically decodes its target exporters on each scrape, allowing them to be presented as unique metrics to Prometheus. It appends a new field (enforced to be unique) of exporter_name to each metric so name-colliding metrics from internal exporters can be differeniated (i.e. since most Prometheus exporters export their own process information as a part of their metrics).

tl;dr It's how you get /metrics to work with a fat container.

Notable Functionality

  • Combine and merge multiple exporters into a single /metrics endpoint
  • Append and override metric labels on all reverse proxied metrics
  • Support exposing metrics from static files on disk
  • Support intelligent on-scrape dynamic metrics from scripts (multiple scrapes are queued to single script execution preventing overloading)
  • Support periodic (cron-like) dynamic metrics from scripts
  • TLS support.
  • Authentication support via HTTP basic auth and/or TLS client-certificates.

Quick Start

Run docker-compose up in the root of the repository to build and start a reverse_exporter combining the metrics of a Prometheus instance with a node_exporter.

Browse to http://127.0.0.1:9998/metrics to view the results.

Usage

See example.config.yml for a config file including all parameters used in some way.

Building

The build system is based on Mage. Simply run go run mage.go to invoke the magefile.

go run mage.go binary will build a binary for your current platform. go run mage.go release builds release binaries.

Directories

Path Synopsis
api
cmd

Jump to

Keyboard shortcuts

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