Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/containersolutions/pactbroker_exporter
A Pact Broker metrics exporter for Prometheus
https://github.com/containersolutions/pactbroker_exporter
golang grafana pact-broker prometheus-exporter
Last synced: 26 days ago
JSON representation
A Pact Broker metrics exporter for Prometheus
- Host: GitHub
- URL: https://github.com/containersolutions/pactbroker_exporter
- Owner: ContainerSolutions
- License: apache-2.0
- Created: 2019-07-29T12:09:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-18T04:56:35.000Z (about 1 year ago)
- Last Synced: 2024-09-27T15:41:03.383Z (about 1 month ago)
- Topics: golang, grafana, pact-broker, prometheus-exporter
- Language: Go
- Homepage:
- Size: 12.8 MB
- Stars: 10
- Watchers: 28
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Pact Broker Exporter
Prometheus exporter for [Pact Broker](https://github.com/pact-foundation/pact_broker).
[![Docker Pulls](https://img.shields.io/docker/pulls/containersol/pactbroker_exporter.svg)](https://hub.docker.com/r/containersol/pactbroker_exporter/tags)
## Quick Start
This package is available for Docker:
1. Example Pact Broker setup you can find in [pperzyna/pact-example](https://github.com/pperzyna/pact-example) repository.
2. Run Pact Broker Exporter
```bash
docker run --net=host -e PB_EXPORTER_PACTBROKER_URI="http://localhost:9292" containersol/pactbroker_exporter
```## Building and running
The default way to build is:
```bash
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.uri`
Address of Pact Broker. Default is `http://localhost:9292`.* `pactbroker.timeout`
Timeout request to Pact Broker. Default is `5s`.* `web.listen-address`
Address to listen on for web interface and telemetry. Default is `:9624`.* `web.telemetry-path`
Path under which to expose metrics. Default is `/metrics`.* `log.level`
Set logging level: one of `debug`, `info`, `warn`, `error`, `fatal`* `log.format`
Set the log output target and format. e.g. `logger:syslog?appname=bob&local=7` or `logger:stdout?json=true`
Defaults to `logger:stderr`.### Environment Variables
The following environment variables configure the exporter:
* `PB_EXPORTER_PACTBROKER_URI`
Address of Pact Broker. Default is `http://localhost:9292`.* `PB_EXPORTER_PACTBROKER_TIMEOUT`
Timeout reqeust to Pact Broker. Default is `5s`.* `PB_EXPORTER_WEB_LISTEN_ADDRESS`
Address to listen on for web interface and telemetry. Default is `:9624`.* `PB_EXPORTER_WEB_TELEMETRY_PATH`
Path 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.