diff --git a/charts/github-exporter/Chart.yaml b/charts/github-exporter/Chart.yaml index a8c3f8a..d1fa75c 100755 --- a/charts/github-exporter/Chart.yaml +++ b/charts/github-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: github-exporter description: exporter for export github metrics home: https://github.com/jkroepke/github_exporter -version: 1.0.0 +version: 1.0.1 appVersion: 1.5.0 maintainers: - name: jkroepke diff --git a/charts/github-exporter/files/github-exporter-org.json b/charts/github-exporter/files/github-exporter-org.json new file mode 100644 index 0000000..6dca1fd --- /dev/null +++ b/charts/github-exporter/files/github-exporter-org.json @@ -0,0 +1,1245 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "annotations": { + "list": [ + { + "$$hashKey": "object:58", + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 66, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 15, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 7, + "interval": "1h", + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_stars_total{owner=~\"$owner\"}[$__interval]))", + "instant": true, + "refId": "A" + } + ], + "title": "Stars", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 8, + "interval": "1h", + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_fork_total{owner=~\"$owner\"}[$__interval]))", + "instant": true, + "refId": "A" + } + ], + "title": "Forks", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 9, + "interval": "1h", + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_traffic_unique_clones{owner=~\"$owner\"}[$__interval]))", + "instant": true, + "refId": "A" + } + ], + "title": "Unique clones", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 1 + }, + "id": 10, + "interval": "1h", + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_traffic_unique_vistors{owner=~\"$owner\"}[$__interval]))", + "instant": true, + "refId": "A" + } + ], + "title": "Unique visitors", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 11, + "interval": "1h", + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_watchers_total{owner=~\"$owner\"}[$__interval]))", + "instant": true, + "refId": "A" + } + ], + "title": "Watchers", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 12, + "interval": "1h", + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [], + "values": false + }, + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto" + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_pull_request_total{owner=~\"$owner\",status=\"open\"}[$__interval]))", + "instant": true, + "legendFormat": "open", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(delta(github_repo_pull_request_total{owner=~\"$owner\",status=\"merged\"}[$__interval]))", + "instant": true, + "legendFormat": "merged", + "refId": "B" + } + ], + "title": "Pull Requests", + "type": "stat" + } + ], + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "refId": "A" + } + ], + "title": "Overview Stats (Broken)", + "type": "row" + }, + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 17, + "panels": [], + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "refId": "A" + } + ], + "title": "Statisitics", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Metric" + }, + "properties": [ + { + "id": "displayName", + "value": "Repository" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "https://github.com/${__cell:raw}", + "url": "https://github.com/${__cell:raw}" + } + ] + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 2, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_traffic_unique_clones{owner=~\"$owner\"}) by (repository)", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "title": "Unique Clones (last week)", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Metric" + }, + "properties": [ + { + "id": "displayName", + "value": "Repository" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "https://github.com/${__cell:raw}", + "url": "https://github.com/${__cell:raw}" + } + ] + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 4, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_traffic_unique_vistors{owner=~\"$owner\"}) by (repository)", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "title": "Unique Visitors (last week)", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Metric" + }, + "properties": [ + { + "id": "displayName", + "value": "Repository" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "https://github.com/${__cell:raw}", + "url": "https://github.com/${__cell:raw}" + } + ] + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 12 + }, + "id": 5, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_fork_total{owner=~\"$owner\"}) by (repository)", + "format": "time_series", + "instant": true, + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "title": "Forks", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Metric" + }, + "properties": [ + { + "id": "displayName", + "value": "Repository" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "https://github.com/${__cell:raw}", + "url": "https://github.com/${__cell:raw}" + } + ] + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 3, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_stars_total{owner=~\"$owner\"}) by (repository)", + "format": "time_series", + "instant": true, + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "title": "Stars", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "repository" + }, + "properties": [ + { + "id": "displayName", + "value": "Repository" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "https://github.com/${__cell:raw}", + "url": "https://github.com/${__cell:raw}" + } + ] + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Last Update" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "unit", + "value": "time: YYYY-MM-DD HH:mm:ss" + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 13, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Last Update" + } + ] + }, + "pluginVersion": "8.2.4", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_pushed_at{owner=~\"$owner\"}) by (repository)", + "format": "table", + "instant": true, + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "title": "Last update", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "repository" + }, + "properties": [ + { + "id": "displayName", + "value": "Repository" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "https://github.com/${__cell:raw}", + "url": "https://github.com/${__cell:raw}" + } + ] + }, + { + "id": "custom.filterable", + "value": false + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 19, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "8.2.4", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(github_repo_vulnerabilities_total{owner=~\"$owner\"}) by (repository)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "title": "Most vulnerabilities", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + } + ], + "schemaVersion": 37, + "style": "dark", + "tags": [ + "github_exporter" + ], + "templating": { + "list": [ + { + "hide": 2, + "label": "datasource", + "name": "DS_PROMETHEUS", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": [], + "value": [] + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(github_repo_info, owner)", + "hide": 0, + "includeAll": true, + "label": "Organization", + "multi": true, + "name": "owner", + "options": [], + "query": { + "query": "label_values(github_repo_info, owner)", + "refId": "Prometheus-owner-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "GitHub Organization Metrics", + "uid": null, + "version": 25, + "weekStart": "" +} diff --git a/charts/github-exporter/files/github-exporter-repo.json b/charts/github-exporter/files/github-exporter-repo.json new file mode 100644 index 0000000..b5a6eff --- /dev/null +++ b/charts/github-exporter/files/github-exporter-repo.json @@ -0,0 +1,1579 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "annotations": { + "list": [ + { + "$$hashKey": "object:385", + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 65, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "displayName": "", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 0 + }, + "id": 2, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_stars_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Stars", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "displayName": "", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 0 + }, + "id": 6, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_watchers_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Watcher", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "displayName": "", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 0 + }, + "id": 3, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_fork_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Forks", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "displayName": "", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 0 + }, + "id": 4, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_commits{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Commits", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "displayName": "", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 0 + }, + "id": 5, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_issues_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Issues", + "type": "stat" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "displayName": "", + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 0 + }, + "id": 7, + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.1.6", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_pull_request_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Pull Requests", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 4 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_watchers_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Watchers", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1408", + "decimals": 0, + "format": "none", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1409", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 4 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_stars_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Stars", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1112", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1113", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 13 + }, + "hiddenSeries": false, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_issues_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository, status)", + "interval": "", + "legendFormat": "{{ status }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Issues", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:788", + "decimals": 0, + "format": "none", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:789", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 22 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_pull_request_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository, status)", + "interval": "", + "legendFormat": "{{ status }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Pull Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1408", + "decimals": 0, + "format": "none", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1409", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 31 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_downloads{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository, release) > 0", + "interval": "", + "legendFormat": "{{ release }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Release Artefacts Downloads", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1408", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1409", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 40 + }, + "hiddenSeries": false, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_commits{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Commits on default branch", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1032", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1033", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 40 + }, + "hiddenSeries": false, + "id": 15, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_tags_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Tags", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1032", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1033", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 3, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 49 + }, + "hiddenSeries": false, + "id": 16, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_size_kb{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Repo Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1032", + "decimals": 3, + "format": "deckbytes", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1033", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 49 + }, + "hiddenSeries": false, + "id": 17, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_vulnerabilities_total{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "{{ repository }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Vulnerabilities", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1032", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1033", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 58 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_languages_size{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository, language)", + "interval": "", + "legendFormat": "{{ language }}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Sizes by Language", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1408", + "decimals": 0, + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1409", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 67 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_traffic_clones{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "Clones", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_traffic_unique_clones{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "interval": "", + "legendFormat": "Unique Clones", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Traffic: Repo Clones (Value based on SUM(timestamp - 2 weeks))", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1408", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1409", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": 0, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 76 + }, + "hiddenSeries": false, + "id": 19, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_traffic_views_avg{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository) ", + "interval": "", + "legendFormat": "Views", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "expr": "sum(github_repo_traffic_unique_vistors_avg{owner=\"$owner\",repository=\"$owner/$repository\"}) by (repository)", + "hide": false, + "interval": "", + "legendFormat": "Unique Visitors", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Traffic: Views (Value based on SUM(timestamp - 2 weeks))", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1408", + "decimals": 0, + "format": "none", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:1409", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "schemaVersion": 37, + "style": "dark", + "tags": [ + "github_exporter" + ], + "templating": { + "list": [ + { + "hide": 2, + "label": "datasource", + "name": "DS_PROMETHEUS", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": ".*", + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(github_repo_info, owner)", + "hide": 0, + "includeAll": false, + "label": "Organization", + "multi": false, + "name": "owner", + "options": [], + "query": { + "query": "label_values(github_repo_info, owner)", + "refId": "Prometheus-owner-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": "xs2a", + "value": "xs2a" + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(github_repo_info{owner=\"$owner\"}, repository)", + "hide": 0, + "includeAll": false, + "label": "Repositories", + "multi": false, + "name": "repository", + "options": [], + "query": { + "query": "label_values(github_repo_info{owner=\"$owner\"}, repository)", + "refId": "Prometheus-repository-Variable-Query" + }, + "refresh": 2, + "regex": ".*?/(.+)", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-90d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "GitHub Repository", + "uid": null, + "version": 13, + "weekStart": "" +} diff --git a/charts/github-exporter/templates/dashboard.yaml b/charts/github-exporter/templates/dashboard.yaml new file mode 100644 index 0000000..1f4c576 --- /dev/null +++ b/charts/github-exporter/templates/dashboard.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "github-exporter.fullname" . }} + labels: + {{- include "github-exporter.labels" . | nindent 4 }} + grafana_dashboard: "1" +data: + {{ (.Files.Glob "files/*").AsConfig | nindent 2 }} diff --git a/charts/github-exporter/templates/servicemonitor.yaml b/charts/github-exporter/templates/servicemonitor.yaml index c1362ab..0b9ba6c 100644 --- a/charts/github-exporter/templates/servicemonitor.yaml +++ b/charts/github-exporter/templates/servicemonitor.yaml @@ -2,14 +2,21 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: + {{- with .Values.metrics.serviceMonitor.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ include "github-exporter.fullname" . }} labels: {{- include "github-exporter.labels" . | nindent 4 }} + {{- with .Values.metrics.serviceMonitor.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }} selector: matchLabels: - {{- include "github-exporter.selectorLabels" . | nindent 4 }} + {{- include "github-exporter.selectorLabels" . | nindent 6 }} endpoints: - port: metrics path: /metrics diff --git a/charts/github-exporter/values.yaml b/charts/github-exporter/values.yaml index b495ac1..83f70ba 100755 --- a/charts/github-exporter/values.yaml +++ b/charts/github-exporter/values.yaml @@ -97,7 +97,8 @@ metrics: namespace: "" # -- Extra labels for the ServiceMonitor ## - labels: {} + labels: + release: kube-prometheus-stack # -- Additional ServiceMonitor annotations (evaluated as a template) ## annotations: {}