Prometheus exporter for Pact Broker.
This package is available for Docker:
-
Example Pact Broker setup you can find in pperzyna/pact-example repository.
-
Run Pact Broker Exporter
docker run --net=host -e PB_EXPORTER_PACTBROKER_URI="http://localhost:9292" containersol/pactbroker_exporterThe default way to build is:
go get github.com/ContainerSolutions/pactbroker_exporter
cd ${GOPATH-$HOME/go}/src/github.com/ContainerSolutions/pactbroker_exporter/
go build -o pactbroker_exporter
export PB_EXPORTER_PACTBROKER_URI="http://localhost:9292"
./pactbroker_exporter <flags>-
pactbroker.uriAddress of Pact Broker. Default ishttp://localhost:9292. -
pactbroker.timeoutTimeout request to Pact Broker. Default is5s. -
web.listen-addressAddress to listen on for web interface and telemetry. Default is:9624. -
web.telemetry-pathPath under which to expose metrics. Default is/metrics. -
log.levelSet logging level: one ofdebug,info,warn,error,fatal -
log.formatSet the log output target and format. e.g.logger:syslog?appname=bob&local=7orlogger:stdout?json=trueDefaults tologger:stderr.
The following environment variables configure the exporter:
-
PB_EXPORTER_PACTBROKER_URIAddress of Pact Broker. Default ishttp://localhost:9292. -
PB_EXPORTER_PACTBROKER_TIMEOUTTimeout reqeust to Pact Broker. Default is5s. -
PB_EXPORTER_WEB_LISTEN_ADDRESSAddress to listen on for web interface and telemetry. Default is:9624. -
PB_EXPORTER_WEB_TELEMETRY_PATHPath under which to expose metrics. Default is/metrics.
Settings set by environment variables starting with PB_ will be overwritten by the corresponding CLI flag if given.