Skip to content

Commit

Permalink
✨ Add CSV Data to Grafana Dashboard (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
connormaglynn authored May 7, 2024
1 parent d158660 commit 9d72758
Show file tree
Hide file tree
Showing 2 changed files with 196 additions and 7 deletions.
190 changes: 184 additions & 6 deletions grafana/dashboards/plotly-dashboard-copy.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
"id": 1,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 6,
"panels": [],
"title": "From Postgres",
"type": "row"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
Expand Down Expand Up @@ -88,7 +101,7 @@
"h": 8,
"w": 8,
"x": 0,
"y": 0
"y": 1
},
"id": 2,
"options": {
Expand Down Expand Up @@ -242,7 +255,7 @@
"h": 8,
"w": 8,
"x": 8,
"y": 0
"y": 1
},
"id": 3,
"options": {
Expand Down Expand Up @@ -403,7 +416,7 @@
"h": 8,
"w": 8,
"x": 16,
"y": 0
"y": 1
},
"id": 1,
"options": {
Expand Down Expand Up @@ -489,21 +502,186 @@
],
"title": "👀 Sentry Transactions Usage - Provisioned",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 9
},
"id": 5,
"panels": [],
"title": "From CSV",
"type": "row"
},
{
"datasource": {
"type": "marcusolsson-csv-datasource",
"uid": "1257c93b-f998-438c-a784-7e90fb94fb3"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "dashed+area"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 1000
},
{
"color": "red",
"value": 1300
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 10
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "10.4.2",
"targets": [
{
"datasource": {
"type": "marcusolsson-csv-datasource",
"uid": "1257c93b-f998-438c-a784-7e90fb94fb3"
},
"decimalSeparator": ".",
"delimiter": ",",
"header": true,
"ignoreUnknown": true,
"refId": "A",
"schema": [
{
"name": "Date",
"type": "time"
},
{
"name": "Product",
"type": "string"
},
{
"name": "Quantity",
"type": "number"
}
],
"skipRows": 0
}
],
"title": "💥 GitHub Actions Usage Quota",
"transformations": [
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "Actions"
}
},
"fieldName": "Product"
}
],
"match": "all",
"type": "include"
}
},
{
"id": "groupBy",
"options": {
"fields": {
"Date": {
"aggregations": [],
"operation": "groupby"
},
"Quantity": {
"aggregations": [
"sum"
],
"operation": "aggregate"
}
}
}
}
],
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2024-04-19T15:49:22.831Z",
"to": "2024-04-29T01:48:19.115Z"
"from": "2023-10-31T05:24:34.422Z",
"to": "2024-05-02T01:53:51.843Z"
},
"timepicker": {},
"timezone": "",
"title": "🙈 Trying to Copy The Dash/Plotly Dashboard at http://localhost:4567 - Provisioned",
"uid": "cdkesxg2h6cxsd",
"version": 2,
"version": 6,
"weekStart": ""
}
13 changes: 12 additions & 1 deletion grafana/provisioning/datasources/datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ datasources:
connMaxLifetime: 14400 # Grafana v5.4+
postgresVersion: 903 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
timescaledb: false
- name: support-stats
- name: Support Stats
uid: 1257c93b-f998-438c-a784-7e90fb94fb36
url: /data/support-stats.csv
type: marcusolsson-csv-datasource
Expand All @@ -27,3 +27,14 @@ datasources:
version: 1
jsonData:
storage: local
- name: GitHub Quota Usage
uid: 1257c93b-f998-438c-a784-7e90fb94fb3
url: /data/github_actions_private_and_internal.csv
type: marcusolsson-csv-datasource
access: "proxy"
basicAuth: false
isDefault: false
editable: true
version: 1
jsonData:
storage: local

0 comments on commit 9d72758

Please sign in to comment.