Scrapes Prometheus metrics and pushes them into Graphite.
pip install -r requirements.txt ./prometheus-graphite-bridge.py options...
Configuration can be preformed by both command line options and environment variables.
||False||When run only perform a single scrape before quitting. Useful for testing|
||False||Enable debug logging|
||9215||Port to use for publishing internal metrics|
||30s||How often to scrape target and send metrics to Graphite server. In addition to an number in seconds, suffixes of s (seconds), m (minutes) and h (hours) are also accepted|
||The full URL to scrape. You will need to include a path such as
||Host to publish Graphite metrics to. Can also specify a port as
||2003||Port of Graphite server|
||Prefix to add to all metrics sent to Graphite server|
The Prometheus Graphite bridge publishes a number of internal metrics on the port specified in the configuration. In addition to the standard Python metrics added by the Prometheus client libraries the following are also published:
|graphite_bridge_scrape_interval_seconds||Gauge||Configured scrape interval|
|graphite_bridge_scrape_total||Counter||Number of scrapes performed|
|graphite_bridge_scrape_duration_seconds||Counter||Sum of actual scrape durations|
docker run -d -p 9215:9215 \ stuartc/prometheus-graphite-bridge \ --scrape-target http://localhost:9100/metrics \ --graphite-host graphite.example.com