Grafana dashboard: GitHub Repo Comment Analytics
Description: GitHub Trends & Analytics on issue comments 

# GitHub Repository Issue Comments 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": 2250,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [
    {
      "icon": "dashboard",
      "includeVars": true,
      "keepTime": false,
      "tags": [],
      "title": "Issues ",
      "type": "link",
      "url": "http://play.grafana.org/dashboard/db/github-repo-trends-issues?orgId=1"
    }
  ],
  "refresh": false,
  "rows": [
    {
      "collapse": false,
      "height": 373,
      "panels": [
        {
          "aliasColors": {
            "open": "#6ED0E0"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_GITHUB}",
          "fill": 3,
          "id": 2,
          "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": [
                {
                  "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:comment",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Comments",
          "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": 434,
      "panels": [
        {
          "columns": [
            {
              "text": "user_login",
              "value": "user_login"
            },
            {
              "text": "Count",
              "value": "Count"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 5,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 4,
          "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": "user_login",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "_type:comment AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "title": "Top Commentators",
          "transform": "json",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "issue",
              "value": "issue"
            },
            {
              "text": "Count",
              "value": "Count"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 6,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 4,
          "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": "issue",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "_type:comment AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "timeFrom": null,
          "title": "Top Commented Issues",
          "transform": "json",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "user_login",
              "value": "user_login"
            },
            {
              "text": "Sum",
              "value": "Sum"
            }
          ],
          "datasource": "${DS_GITHUB}",
          "filterNull": false,
          "fontSize": "100%",
          "id": 7,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 4,
          "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": "user_login",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "dsType": "elasticsearch",
              "metrics": [
                {
                  "field": "reactions_total",
                  "id": "1",
                  "meta": {},
                  "settings": {},
                  "type": "sum"
                }
              ],
              "query": "_type:comment AND repo:$repo",
              "refId": "A",
              "target": "",
              "timeField": "created_at"
            }
          ],
          "timeFrom": null,
          "title": "Comment reaction totals",
          "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": "1d",
          "value": "1d"
        },
        "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": true,
            "text": "1d",
            "value": "1d"
          },
          {
            "selected": false,
            "text": "7d",
            "value": "7d"
          },
          {
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "selected": false,
            "text": "1M",
            "value": "1M"
          }
        ],
        "query": "1m,10m,30m,1h,6h,12h,1d,7d,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 Comment Analytics",
  "version": 13,
  "description": "GitHub Trends & Analytics on issue comments "
}