Skip to content

Instantly share code, notes, and snippets.

@hugohaggmark
Created February 10, 2021 06:11
Show Gist options
  • Save hugohaggmark/851991a09d8ee10b9346b0e943ee9aa5 to your computer and use it in GitHub Desktop.
Save hugohaggmark/851991a09d8ee10b9346b0e943ee9aa5 to your computer and use it in GitHub Desktop.
Report Template Variable Json
{
"__inputs": [
{
"name": "DS_GDEV-TESTDATA",
"label": "gdev-testdata",
"description": "",
"type": "datasource",
"pluginId": "testdata",
"pluginName": "TestData DB"
},
{
"name": "DS_TESTDATA_DB",
"label": "TestData DB",
"description": "",
"type": "datasource",
"pluginId": "testdata",
"pluginName": "TestData DB"
},
{
"name": "VAR_CONSTANT",
"type": "constant",
"label": "constant",
"value": "constant value",
"description": ""
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.5.0-pre"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "datasource",
"id": "testdata",
"name": "TestData DB",
"version": "1.0.0"
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1612937175161,
"links": [],
"panels": [
{
"datasource": "${DS_GDEV-TESTDATA}",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 4,
"links": [
{
"targetBlank": true,
"title": "Test",
"url": "http://localhost:3000/d/J_qZ2-YMz/report-template-variable?var-datacenter=${datacenter}"
},
{
"targetBlank": true,
"title": "Query Param",
"url": "http://localhost:3000/d/J_qZ2-YMz/report-template-variable?${datacenter:queryparam}"
}
],
"options": {
"content": "## Data center = `$datacenter`\n\n### server = `$server`\n\n#### pod = `$pod`\n\n#### custom = `$custom`\n\n#### text = `$text`\n\n#### interval = `$interval`\n\n#### constant = `$constant`\n\n#### ds = `$ds`",
"mode": "markdown"
},
"pluginVersion": "7.5.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"type": "text"
},
{
"datasource": "${DS_GDEV-TESTDATA}",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {},
"links": [
{
"targetBlank": true,
"title": "Query Param",
"url": "http://localhost:3000/d/J_qZ2-YMz/report-template-variable?${datacenter:queryparam}&${server:queryparam}&${pod:queryparam}&${query0:queryparam}"
}
],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "7.5.0-pre",
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"type": "stat"
}
],
"refresh": false,
"schemaVersion": 27,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": "*",
"current": {},
"datasource": "${DS_TESTDATA_DB}",
"definition": "*",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": null,
"multi": true,
"name": "datacenter",
"options": [],
"query": {
"query": "*",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {},
"datasource": "${DS_TESTDATA_DB}",
"definition": "$datacenter.*",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": null,
"multi": true,
"name": "server",
"options": [],
"query": {
"query": "$datacenter.*",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": "*",
"current": {},
"datasource": "${DS_TESTDATA_DB}",
"definition": "$datacenter.$server.*",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": null,
"multi": true,
"name": "pod",
"options": [],
"query": {
"query": "$datacenter.$server.*",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"datasource": "Robustperception",
"description": null,
"error": null,
"filters": [
{
"condition": "",
"key": "__name__",
"operator": "=",
"value": "alertmanager_alerts"
}
],
"hide": 0,
"label": null,
"name": "adhoc",
"skipUrlSync": false,
"type": "adhoc"
},
{
"allValue": null,
"current": {
"selected": true,
"tags": [],
"text": [
"1",
"2"
],
"value": [
"1",
"2"
]
},
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": null,
"multi": true,
"name": "custom",
"options": [
{
"selected": false,
"text": "All",
"value": "$__all"
},
{
"selected": true,
"text": "1",
"value": "1"
},
{
"selected": true,
"text": "2",
"value": "2"
},
{
"selected": false,
"text": "3",
"value": "three"
},
{
"selected": false,
"text": "4",
"value": "four"
}
],
"query": "1,2,3 : three, 4 : four",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": false,
"text": "default values",
"value": "default values"
},
"description": null,
"error": null,
"hide": 0,
"label": null,
"name": "text",
"options": [
{
"selected": true,
"text": "default values",
"value": "default values"
}
],
"query": "default values",
"skipUrlSync": false,
"type": "textbox"
},
{
"auto": true,
"auto_count": 30,
"auto_min": "10s",
"current": {
"selected": false,
"text": "auto",
"value": "$__auto_interval_interval"
},
"description": null,
"error": null,
"hide": 0,
"label": null,
"name": "interval",
"options": [
{
"selected": true,
"text": "auto",
"value": "$__auto_interval_interval"
},
{
"selected": false,
"text": "1m",
"value": "1m"
},
{
"selected": false,
"text": "10m",
"value": "10m"
},
{
"selected": false,
"text": "30m",
"value": "30m"
},
{
"selected": false,
"text": "1h",
"value": "1h"
},
{
"selected": false,
"text": "6h",
"value": "6h"
},
{
"selected": false,
"text": "12h",
"value": "12h"
},
{
"selected": false,
"text": "1d",
"value": "1d"
},
{
"selected": false,
"text": "7d",
"value": "7d"
},
{
"selected": false,
"text": "14d",
"value": "14d"
},
{
"selected": false,
"text": "30d",
"value": "30d"
}
],
"query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"refresh": 2,
"skipUrlSync": false,
"type": "interval"
},
{
"description": null,
"error": null,
"hide": 2,
"label": null,
"name": "constant",
"query": "${VAR_CONSTANT}",
"skipUrlSync": false,
"type": "constant",
"current": {
"value": "${VAR_CONSTANT}",
"text": "${VAR_CONSTANT}",
"selected": false
},
"options": [
{
"value": "${VAR_CONSTANT}",
"text": "${VAR_CONSTANT}",
"selected": false
}
]
},
{
"current": {
"selected": true,
"text": [
"TestData DB"
],
"value": [
"TestData DB"
]
},
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": null,
"multi": true,
"name": "ds",
"options": [],
"query": "testdata",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Report Template Variable",
"uid": "J_qZ2-YMz",
"version": 32
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment