docs/dashboards/wakatime-coding-stats.json
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.3"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Displays statistics from the Prometheus wakatime_exporter v0.1.0",
"editable": true,
"gnetId": 12790,
"graphTooltip": 0,
"id": null,
"iteration": 1597508999485,
"links": [
{
"icon": "info",
"tags": [],
"targetBlank": true,
"title": "Wakatime Exporter",
"tooltip": "Open the Wakatime Exporter project",
"type": "link",
"url": "https://github.com/MacroPower/wakatime_exporter"
}
],
"panels": [
{
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 0,
"y": 0
},
"id": 11,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.3",
"targets": [
{
"expr": "sum without (instance) (wakatime_cumulative_seconds_total)",
"interval": "",
"legendFormat": "total",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Time Logged",
"type": "stat"
},
{
"aliasColors": {
"Mac": "dark-purple",
"Windows": "dark-blue"
},
"bars": true,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 4,
"x": 3,
"y": 0
},
"hiddenSeries": false,
"id": 9,
"interval": null,
"legend": {
"avg": false,
"current": false,
"hideEmpty": false,
"hideZero": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without (instance) (increase(wakatime_operating_system_seconds_total[$__range])) > 0",
"instant": true,
"interval": "1m",
"legendFormat": "{{ name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": "$longterm",
"timeRegions": [],
"timeShift": null,
"title": "Time by OS",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "series",
"name": null,
"show": false,
"values": ["total"]
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": true,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {
"align": null
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 5,
"x": 7,
"y": 0
},
"hiddenSeries": false,
"id": 17,
"interval": null,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"links": [],
"maxDataPoints": 100,
"nullPointMode": "null",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without (instance) (increase(wakatime_machine_seconds_total[$__range])) > 0",
"instant": true,
"interval": "",
"legendFormat": "{{ name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": "$longterm",
"timeRegions": [],
"timeShift": null,
"title": "Time by Machine",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "series",
"name": null,
"show": false,
"values": ["total"]
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Go": "super-light-blue",
"JSON": "light-yellow",
"Other": "dark-red",
"Python": "dark-blue",
"Text": "dark-purple"
},
"bars": true,
"cacheTimeout": null,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 19,
"interval": null,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"hideEmpty": false,
"hideZero": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "total",
"sortDesc": true,
"total": true,
"values": true
},
"lines": false,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 10,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "topk(10, sum without (instance) (increase(wakatime_language_seconds_total{name!=\"Other\"}[$__range])) > 0)",
"format": "time_series",
"instant": true,
"interval": "",
"legendFormat": "{{ name }}",
"refId": "A"
},
{
"expr": "sum(increase(wakatime_language_seconds_total{name!~\"$top10lang\"}[$__range])) > 0",
"format": "time_series",
"instant": true,
"interval": "",
"legendFormat": "Other",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": "$longterm",
"timeRegions": [],
"timeShift": null,
"title": "Language Distribution",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "series",
"name": null,
"show": true,
"values": ["current"]
},
"yaxes": [
{
"$$hashKey": "object:1524",
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:1525",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
}
]
},
"unit": "locale"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 0,
"y": 5
},
"id": 13,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.3",
"targets": [
{
"expr": "sum without (instance) (wakatime_rank)",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Current Rank",
"type": "stat"
},
{
"aliasColors": {
"Go": "super-light-blue",
"JSON": "light-yellow",
"Other": "dark-red",
"Python": "dark-blue",
"Text": "dark-purple"
},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 10,
"fillGradient": 0,
"gridPos": {
"h": 13,
"w": 12,
"x": 0,
"y": 10
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"hideEmpty": true,
"hideZero": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "total",
"sortDesc": true,
"total": true,
"values": true
},
"lines": false,
"linewidth": 0,
"nullPointMode": "null as zero",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "sum without (instance) (increase(wakatime_language_seconds_total[1d]))",
"interval": "1d",
"intervalFactor": 1,
"legendFormat": "{{ name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [
{
"colorMode": "background6",
"fill": true,
"fillColor": "rgba(234, 112, 112, 0.12)",
"line": false,
"lineColor": "rgba(237, 46, 24, 0.60)",
"op": "time"
}
],
"timeShift": null,
"title": "Time by Language",
"tooltip": {
"shared": true,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"wakatime_exporter": "blue"
},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 1,
"gridPos": {
"h": 13,
"w": 12,
"x": 12,
"y": 10
},
"hiddenSeries": false,
"id": 4,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideEmpty": true,
"hideZero": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sort": "total",
"sortDesc": true,
"total": true,
"values": true
},
"lines": false,
"linewidth": 2,
"nullPointMode": "null as zero",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"expr": "sum without (instance) (increase(wakatime_project_seconds_total[1d]))",
"interval": "1d",
"intervalFactor": 1,
"legendFormat": "{{ name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Time by Project",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"time": "purple"
},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"decimals": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 1,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 23
},
"hiddenSeries": false,
"id": 7,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"hideEmpty": true,
"hideZero": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": true,
"values": true
},
"lines": false,
"linewidth": 2,
"nullPointMode": "null as zero",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "activity",
"bars": false,
"hideTooltip": true,
"legend": false,
"lines": true,
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum without (instance) (increase(wakatime_seconds_total[1d]))",
"instant": false,
"interval": "1d",
"intervalFactor": 1,
"legendFormat": "time",
"refId": "A"
},
{
"expr": "sum without (instance) (increase(wakatime_seconds_total[$__interval]))",
"instant": false,
"interval": "",
"intervalFactor": 10,
"legendFormat": "activity",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Total Time",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": null,
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 2,
"gridPos": {
"h": 9,
"w": 6,
"x": 12,
"y": 23
},
"hiddenSeries": false,
"id": 20,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"nullPointMode": "null as zero",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "wakatime_goal_progress_seconds_total{delta=\"day\"} / wakatime_goal_seconds{delta=\"day\"}",
"interval": "1m",
"intervalFactor": 3,
"legendFormat": "{{ name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": "24h",
"timeRegions": [],
"timeShift": null,
"title": "Daily Goal Progress",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "percentunit",
"label": null,
"logBase": 1,
"max": "1",
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "$prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 2,
"gridPos": {
"h": 9,
"w": 6,
"x": 18,
"y": 23
},
"hiddenSeries": false,
"id": 15,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"nullPointMode": "connected",
"percentage": false,
"pluginVersion": "7.1.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "wakatime_goal_progress_seconds_total{delta=\"week\"} / wakatime_goal_seconds{delta=\"week\"}",
"interval": "1m",
"intervalFactor": 3,
"legendFormat": "{{ name }}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": "7d",
"timeRegions": [],
"timeShift": null,
"title": "Weekly Goal Progress",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "percentunit",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": false,
"schemaVersion": 26,
"style": "dark",
"tags": ["wakatime", "prometheus"],
"templating": {
"list": [
{
"current": {},
"hide": 0,
"includeAll": false,
"label": "Prometheus",
"multi": false,
"name": "prometheus",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"allValue": null,
"current": {},
"datasource": "$prometheus",
"definition": "query_result(topk(10, sum without (instance,job) (increase(wakatime_language_seconds_total{name!=\"Other\"}[$__range])) > 0))",
"hide": 2,
"includeAll": true,
"label": null,
"multi": false,
"name": "top10lang",
"options": [],
"query": "query_result(topk(10, sum without (instance,job) (increase(wakatime_language_seconds_total{name!=\"Other\"}[$__range])) > 0))",
"refresh": 2,
"regex": "/\"([^\"]+)\"/",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"auto": false,
"auto_count": 30,
"auto_min": "10s",
"current": {
"selected": true,
"text": "120d",
"value": "120d"
},
"hide": 0,
"label": "Long Term Interval",
"name": "longterm",
"options": [
{
"selected": false,
"text": "1d",
"value": "1d"
},
{
"selected": false,
"text": "7d",
"value": "7d"
},
{
"selected": false,
"text": "14d",
"value": "14d"
},
{
"selected": false,
"text": "30d",
"value": "30d"
},
{
"selected": false,
"text": "60d",
"value": "60d"
},
{
"selected": true,
"text": "120d",
"value": "120d"
}
],
"query": "1d,7d,14d,30d,60d,120d",
"queryValue": "",
"refresh": 2,
"skipUrlSync": false,
"type": "interval"
}
]
},
"time": {
"from": "now-7d",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "browser",
"title": "1/0.1.0 Wakatime Exporter - Wakatime Coding Stats Dashboard",
"uid": "BRqbRfVGz",
"version": 83
}