Sign inSign up

stuartc/prometheus-graphite-bridge

By stuartc

•Updated over 7 years ago

Scrapes Prometheus metrics and pushes them into Graphite

Image
0

1M+

stuartc/prometheus-graphite-bridge repository overview

⁠Prometheus Graphite Bridge Build Status

Scrapes Prometheus metrics and pushes them into Graphite.

⁠Running

pip install -r requirements.txt
./prometheus-graphite-bridge.py options...

⁠Configuration

Configuration can be preformed by both command line options and environment variables.

Command LineEnvironmentDefaultDescription
--singleSINGLEFalseWhen run only perform a single scrape before quitting. Useful for testing
--debugDEBUGFalseEnable debug logging
--metrics-portMETRICS_PORT9215Port to use for publishing internal metrics
--scrape-interval, --intervalSCRAPE_INTERVAL30sHow 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
--scrape-target, --targetSCRAPE_TARGETThe full URL to scrape. You will need to include a path such as /metrics. Defaults to http if scheme is not specified
--graphite-host, --graphiteGRAPHITE_HOSTHost to publish Graphite metrics to. Can also specify a port as HOST:PORT
--graphite-portGRAPHITE_PORT2003Port of Graphite server
--graphite-prefix, --prefixGRAPHITE_PREFIXPrefix to add to all metrics sent to Graphite server

⁠Internal Metrics

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:

MetricTypeDescription
graphite_bridge_scrape_interval_secondsGaugeConfigured scrape interval
graphite_bridge_scrape_totalCounterNumber of scrapes performed
graphite_bridge_scrape_duration_secondsCounterSum of actual scrape durations

⁠Using Docker

Docker Build Status

docker run -d -p 9215:9215 \
  stuartc/prometheus-graphite-bridge \
    --scrape-target http://localhost:9100/metrics \
    --graphite-host graphite.example.com

Tag summary

Content type

Image

Digest

Size

35.6 MB

Last updated

over 7 years ago

docker pull stuartc/prometheus-graphite-bridge