department-of-veterans-affairs/gar-exporter

Name: gar-exporter

Owner: Department of Veterans Affairs

Description: Google Analytics Reporting API V4

Created: 2018-04-05 15:07:44.0

Updated: 2018-04-19 20:58:02.0

Pushed: 2018-04-19 19:57:51.0

Homepage: null

Size: 9

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Prometheus Google Analytics Reporting API (V4) Exporter

Exposes a set of basic metrics from the Google Analytics Reporting API (V4), to a Prometheus compatible endpoint. This is a very basic implementation, designed for a specific purpose. If you wish to extend/fork this repo to be something greater… We are more than open to any pull requests / feedback

Configuration

This exporter is setup to take the following parameters from environment variables:

Account email and view ID need to be obtained from your google account details. Details on how can be found here You also need to supply a PEM file with a key to access the API, details on this link above.

Install and deploy

Build a docker image:

er build -t <image-name> .
er run -d --restart=always -p 9173:9173 -e IMAGES="your@user.com" -e VIEW_ID="viewID" -e START_DATE="2010-01-01" <image-name>
Metrics

Metrics will be made available on port 9173 by default


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.