Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 867 Bytes

README.md

File metadata and controls

34 lines (22 loc) · 867 Bytes

prometheus-gmail-exporter-go

A prometheus exporter for gmail.

Heavily inspired by https://github.com/jamesread/prometheus-gmail-exporter, but written in go instead of Python.

Authentication

You'll need to set up your own project in GCP and create an OAuth application.

Follow the steps in the Gmail for Developers Go quickstart to set this up. Store your client credentials in credentials.json.

The exporter will use your client credentials to get an access token which lets it talk to the Gmail API. It will store the token in token.json.

Running

Running locally

go run *.go

Using docker

docker build -t prometheus-gmail-exporter-go .
docker run -it -p 2112:2112 -v $(pwd):/app prometheus-gmail-exporter-go