Add GitHub monitoring mixin with dashboards
Mixins are a collection of configurable, reusable Prometheus rules, alerts and/or Grafana dashboards for a particular system. The idea is that you can use these to set up appropriate monitoring for your systems. (More details here: https://github.com/monitoring-mixins/docs.)
This pull request is an initial attempt at a GitHub mixin, providing a dashboard for repository stats, and another one for tracking the GitHub API usage.
I've added the mixin here as ideally it should live in the repository containing the code which emits the telemetry data (metrics) on which the mixin is based. (A couple of example mixins which do this: node_exporter, kube-state-metrics.)
Changes
- Added GitHub mixin with the two dashboards. The dashboards are defined in Jsonnet and use the Grafonnet library.
- Updated the Travis CI config so the mixin is tested.
- Added user label to
pull_request_countmetric. Previously it only had the repo label which isn't enough to uniquely identify a GitHub repository.- Used
gofmt, which reformatted a couple of imports in the Go files I edited for this.
- Used
Screenshots

Hello @Rucknar, I see that you have previously reviewed PRs and gotten them merged, hoping you can do the same for this one.
We are working in earnest to get this exporter embedded in the Grafana Agent and deploy this dashboard as an easily consumable integration on Grafana Cloud.
It would be ideal to do so from the master branch, if possible.
Thanks!
Actually, I just started to try consuming this in anger, and it needs some minor tweaks. Please standby :)