diff --git a/metrics.py b/metrics.py index 7b9e506b..8404bfc2 100755 --- a/metrics.py +++ b/metrics.py @@ -497,6 +497,14 @@ def ingest_dashboard(api): 'time': time, }) + points.append({ + 'measurement': 'dashboard_revision', + 'fields': { + 'revision': revision, + }, + 'time': time, + }) + if len(points) >= 1000: client.write_points(points, 's') count += len(points) diff --git a/metrics/grafana/dashboard.json b/metrics/grafana/dashboard.json index f812033a..7293cf6a 100644 --- a/metrics/grafana/dashboard.json +++ b/metrics/grafana/dashboard.json @@ -571,6 +571,118 @@ "show": true } ] + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "$project", + "description": "The number of revisions to dashboard container made during a week.", + "fill": 1, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "$col", + "groupBy": [ + { + "params": [ + "1w" + ], + "type": "time" + } + ], + "measurement": "dashboard_revision", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "revision" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "count" + ], + "type": "alias" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Weekly Revisions", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "short", + "label": "", + "logBase": 1, + "max": "7", + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] } ], "refresh": false,