Skip to content

Instantly share code, notes, and snippets.

@imerla1
Created September 13, 2023 14:57
Show Gist options
  • Save imerla1/15e36dc5d112e0eb328409195e082c70 to your computer and use it in GitHub Desktop.
Save imerla1/15e36dc5d112e0eb328409195e082c70 to your computer and use it in GitHub Desktop.
Grafana dashboard model
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"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": 1,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 18,
"options": {
"displayMode": "gradient",
"minVizHeight": 15,
"minVizWidth": 0,
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"limit": 80,
"values": true
},
"showUnfilled": true
},
"pluginVersion": "9.3.2",
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "$.items.[*].section"
},
{
"jsonPath": "$.items.[*].minTicketPriceInSection",
"language": "jsonpath",
"name": ""
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Min Ticket Price In section.",
"type": "bargauge"
},
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"description": "",
"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": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 4,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.2",
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "venueName",
"name": "venue"
},
{
"jsonPath": "eventName",
"language": "jsonpath",
"name": "event name"
},
{
"jsonPath": "readableDate",
"language": "jsonpath",
"name": "date"
},
{
"jsonPath": "totalTickets",
"language": "jsonpath",
"name": "Total Tickets"
},
{
"jsonPath": "availableTickets",
"language": "jsonpath",
"name": "Available Tickets"
},
{
"jsonPath": "soldTickets",
"language": "jsonpath",
"name": "sold Tickets"
},
{
"jsonPath": "eventId",
"language": "jsonpath",
"name": "event id"
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Bruno Mars Concert AT tbilisi.",
"type": "table"
},
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": [
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"totalAvailableTicketsInSection",
"UT 23",
"Star Ring"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 16
},
"id": 16,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"limit": 80,
"values": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "$.items.[*].section"
},
{
"jsonPath": "$.items.[*].totalAvailableTicketsInSection",
"language": "jsonpath",
"name": "",
"type": "number"
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Available Tickets in section Pie Chart",
"type": "piechart"
},
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 29,
"w": 12,
"x": 0,
"y": 24
},
"id": 14,
"options": {
"displayMode": "gradient",
"minVizHeight": 20,
"minVizWidth": 0,
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"limit": 180,
"values": true
},
"showUnfilled": true
},
"pluginVersion": "9.3.2",
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "$.items.[*].section"
},
{
"jsonPath": "$.items.[*].totalAvailableTicketsInSection",
"language": "jsonpath",
"name": ""
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Total Available Tickets In section - Bar Gauge",
"type": "bargauge"
},
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"availableTickets"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 53
},
"id": 10,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "$.[*].revisionDate",
"type": "time"
},
{
"jsonPath": "$.[*].availableTickets",
"language": "jsonpath",
"name": "",
"type": "number"
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "/test3",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Total Tickets Time Series",
"type": "timeseries"
},
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 61
},
"id": 8,
"options": {
"barRadius": 0,
"barWidth": 0.97,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"tooltip": {
"mode": "single",
"sort": "none"
},
"xTickLabelRotation": 0,
"xTickLabelSpacing": 0
},
"pluginVersion": "9.3.2",
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "$.items.[*].section"
},
{
"jsonPath": "$.items.[*].totalAvailableTicketsInSection",
"language": "jsonpath",
"name": ""
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Panel Title",
"type": "barchart"
},
{
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "gel"
},
"overrides": [
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"rawPrice"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": false
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 69
},
"id": 6,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"displayMode": "table",
"placement": "right",
"showLegend": true,
"values": []
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"limit": 120,
"values": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.2",
"targets": [
{
"cacheDurationSeconds": 300,
"columns": [],
"datasource": {
"type": "marcusolsson-json-datasource",
"uid": "irq0dimIk"
},
"fields": [
{
"jsonPath": "items.[*].section"
},
{
"jsonPath": "items.[*].averageAvailableTicketPrice",
"language": "jsonpath",
"name": "",
"type": "number"
}
],
"filters": [],
"format": "table",
"global_query_id": "",
"method": "GET",
"queryParams": "",
"refId": "A",
"root_selector": "",
"source": "url",
"type": "json",
"url": "https://github.com/yesoreyeram/grafana-infinity-datasource/blob/main/testdata/users.json",
"urlPath": "",
"url_options": {
"data": "",
"method": "GET"
}
}
],
"title": "Section and AVG ticket price",
"type": "piechart"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 77
},
"id": 2,
"panels": [],
"title": "Row title",
"type": "row"
}
],
"refresh": false,
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "test-dash-1",
"uid": "3EJNKmmSk",
"version": 15,
"weekStart": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment