Grafana dashboard: GitHub Repo Issue Analytics
Description: GitHub Trends & Analytics on issues

# GitHub Repository Issue Analytics

This dashboard is built for data imported from GitHub to Elasticearch using this tool: 

### [github.com/grafana/github-to-es](https://github.com/grafana/github-to-es)

Follow the README for that node.js tool for instructions on how to get GitHub issue and comments data into Elasticseach so you can visualize the data in Grafana using for example this dashboard. 



{
  "__inputs": [
    {
      "name": "DS_GITHUB",
      "label": "Elasticsearch",
      "description": "Your Elasticsearch data source configured to use the github index",
      "type": "datasource",
      "pluginId": "elasticsearch",
      "pluginName": "Elasticsearch"
    }
  ],
  "__requires": [
    {
      "type": "datasource",
      "id": "elasticsearch",
      "name": "Elasticsearch",
      "version": "3.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "4.2.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": true,
  "gnetId": 2244,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [
    {
      "icon": "dashboard",
      "tags": [],
      "title": "Comments",
      "type": "link",
      "url": "http://play.grafana.org/dashboard/db/github-repo-trends-comments"
    }
  ],
  "refresh": false,
  "rows": [
    {
      "collapse": false,
      "height": 378,
      "panels": [
        {
          "aliasColors": {
            "open": "#6ED0E0"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_GITHUB}",
          "fill": 3,
          "id": 1,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": true,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 12,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "state",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 0,
                    "order": "asc",
                    "orderBy": "_term",
                    "size": "10"
                  },
                  "type": "terms"
                },
                {
                  "field": "created_at",
                  "id": "2",
                  "settings": {
                    "interval": "$interval",
                    "min_doc_count": 0,
                    "trimEdges": 0
                  },
                  "type": "date_histogram"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "repo:$repo AND _type:issue",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Created Issues",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    },
    {
      "collapse": false,
      "height": 356,
      "panels": [
        {
          "aliasColors": {
            "open": "#6ED0E0"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_GITHUB}",
          "decimals": 0,
          "fill": 3,
          "id": 3,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "sort": "total",
            "sortDesc": true,
            "total": true,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 12,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "alias": "{{labels}}",
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "labels",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "missing": "no_labels",
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                },
                {
                  "field": "created_at",
                  "id": "2",
                  "settings": {
                    "interval": "$interval",
                    "min_doc_count": 0,
                    "trimEdges": 0
                  },
                  "type": "date_histogram"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "repo:$repo AND _type:issue",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Issues by label",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    },
    {
      "collapse": false,
      "height": 430,
      "panels": [
        {
          "columns": [
            {
              "text": "labels",
              "value": "labels"
            },
            {
              "text": "Count",
              "value": "Count"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 8,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 3,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "labels",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "missing": "no_labels",
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "_type:issue AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "title": "Top Labels",
          "transform": "json",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "assignee",
              "value": "assignee"
            },
            {
              "text": "Count",
              "value": "Count"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 9,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 3,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "assignee",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "missing": null,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "_type:issue AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "timeFrom": null,
          "title": "Assigned Most Issues",
          "transform": "json",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "number",
              "value": "number"
            },
            {
              "text": "Sum",
              "value": "Sum"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 10,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 3,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "number",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "missing": null,
                    "order": "desc",
                    "orderBy": "1",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "reactions_total",
                  "id": "1",
                  "meta": {},
                  "settings": {},
                  "type": "sum"
                }
              ],
              "query": "_type:issue AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "timeFrom": null,
          "title": "Most Reactions",
          "transform": "json",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "number",
              "value": "number"
            },
            {
              "text": "Sum",
              "value": "Sum"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 11,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 3,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "number",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "missing": null,
                    "order": "desc",
                    "orderBy": "1",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "comments",
                  "id": "1",
                  "meta": {},
                  "settings": {},
                  "type": "sum"
                }
              ],
              "query": "_type:issue AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "timeFrom": null,
          "title": "Most Comments",
          "transform": "json",
          "type": "table"
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_GITHUB}",
        "hide": 0,
        "includeAll": false,
        "label": "Repo",
        "multi": true,
        "name": "repo",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"repo\"} ",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "auto": true,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "text": "1w",
          "value": "1w"
        },
        "hide": 0,
        "label": null,
        "name": "interval",
        "options": [
          {
            "selected": false,
            "text": "auto",
            "value": "$__auto_interval"
          },
          {
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          },
          {
            "selected": true,
            "text": "1w",
            "value": "1w"
          },
          {
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "selected": false,
            "text": "1M",
            "value": "1M"
          }
        ],
        "query": "1m,10m,30m,1h,6h,12h,1d,1w,14d,1M",
        "refresh": 2,
        "type": "interval"
      },
      {
        "datasource": "github",
        "filters": [],
        "hide": 0,
        "label": null,
        "name": "Filters",
        "type": "adhoc"
      }
    ]
  },
  "time": {
    "from": "now-2y",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "GitHub Repo Issue Analytics",
  "version": 7,
  "description": "GitHub Trends & Analytics on issues"
}