Skip to content

richardTowers/prometheus-gmail-exporter-go

Repository files navigation

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

About

A prometheus exporter which reports metrics about your Gmail inbox. Inspired by https://github.com/jamesread/prometheus-gmail-exporter

Resources

Stars

Watchers

Forks

Packages