Categorygithub.com/cpanato/circleci-exporter
repositorypackage
0.4.0
Repository: https://github.com/cpanato/circleci-exporter.git
Documentation: pkg.go.dev

# README

CircleCI Exporter

Prometheus exporter exposing CircleCI metrics.

This exporter collects the insights metrics from CircleCI - CircleCI's insights API

Getting Started

When configuring for an organization Access tokens must have the repo or admin:org scope. When configuring for an user Access tokens must have the user scope.

Prerequisites

To run this project, you will need a working Go environment.

Installing

$ go get -u github.com/cpanato/circleci-exporter

Building

Build the sources with

$ make build

Run the binary

$ ./circleci-exporter --gh.circleci-token="CIRCLECI_TOKEN" --gh.circleci-org="Honk-org" --gh.circleci-projects="My_Project_1" --gh.circleci-projects="My_Project_2"

Docker

You can deploy this exporter using the ghcr.io/cpanato/github_actions_exporter-linux-amd64 Docker image.

For example:

$ docker pull ghcr.io/cpanato/circleci-exporter:v0.1.0

$ docker run -d -p 9101:9101 ghcr.io/cpanato/circleci_exporter:v0.1.0  --gh.circleci-token="CIRCLECI_TOKEN" --gh.circleci-org="Honk-org" --gh.circleci-projects="My_Project_1" --gh.circleci-projects="My_Project_2"

Testing

Running unit tests

$ make test

Contributing

Refer to CONTRIBUTING.md.

License

Apache License 2.0, see LICENSE.