github-exporter icon indicating copy to clipboard operation
github-exporter copied to clipboard

Add GitHub monitoring mixin with dashboards

Open fionaliao opened this issue 5 years ago • 2 comments

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_count metric. 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.

Screenshots

repo-stats-dashboard api-usage-dashboard

fionaliao avatar Dec 15 '20 11:12 fionaliao

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!

rgeyer avatar Jul 21 '21 16:07 rgeyer

Actually, I just started to try consuming this in anger, and it needs some minor tweaks. Please standby :)

rgeyer avatar Jul 21 '21 17:07 rgeyer