I am not able to attach json from a working dashboard (sqlserver)
below is sample code
{
“annotations”: {
“list”: [
{
“builtIn”: 1,
“datasource”: {
“type”: “datasource”,
“uid”: “grafana”
},
“enable”: true,
“hide”: true,
“iconColor”: “rgba(0, 211, 255, 1)”,
“name”: “Annotations & Alerts”,
“type”: “dashboard”
}
]
},
“description”: “Performance and health metrics for your SQL Servers.”,
“editable”: true,
“fiscalYearStartMonth”: 0,
“gnetId”: 4730,
“graphTooltip”: 0,
“id”: 1,
“links”: ,
“liveNow”: false,
“panels”: [
{
“collapsed”: false,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“gridPos”: {
“h”: 1,
“w”: 24,
“x”: 0,
“y”: 0
},
“id”: 98,
“panels”: ,
“targets”: [
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“refId”: “A”
}
],
“title”: “Databases properties”,
“type”: “row”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“0”: {
“text”: “HEALTHY”
},
“1”: {
“text”: “NOT HEALTHY”
}
},
“type”: “value”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “rgba(32, 33, 58, 0.9)”,
“value”: null
},
{
“color”: “rgb(255, 0, 0)”,
“value”: 0
},
{
“color”: “rgba(50, 172, 45, 0.97)”,
“value”: 0
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 4,
“x”: 0,
“y”: 1
},
“id”: 69,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “value”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: [
{
“params”: [
“$__interval”
],
“type”: “time”
},
{
“params”: [
“null”
],
“type”: “fill”
}
],
“measurement”: “State OFFLINE”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT mean("Total") FROM "State OFFLINE" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter GROUP BY time($__interval) fill(null)”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
},
{
“params”: ,
“type”: “mean”
}
]
],
“tags”: [
{
“key”: “servername”,
“operator”: “=~”,
“value”: “/$Instance$/”
},
{
“condition”: “AND”,
“key”: “type”,
“operator”: “=”,
“value”: “Database properties”
}
]
}
],
“title”: “DATABASES HEALTH”,
“type”: “stat”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 2,
“x”: 4,
“y”: 1
},
“id”: 63,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: ,
“measurement”: “State ONLINE”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT "Total" FROM "State ONLINE" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
}
]
],
“tags”: [
{
“key”: “servername”,
“operator”: “=~”,
“value”: “/$Instance$/”
},
{
“condition”: “AND”,
“key”: “type”,
“operator”: “=”,
“value”: “Database properties”
}
]
}
],
“title”: “ONLINE”,
“type”: “stat”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 2,
“x”: 6,
“y”: 1
},
“id”: 64,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: ,
“measurement”: “State OFFLINE”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT "Total" FROM "State OFFLINE" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
}
]
],
“tags”: [
{
“key”: “servername”,
“operator”: “=~”,
“value”: “/$Instance$/”
},
{
“condition”: “AND”,
“key”: “type”,
“operator”: “=”,
“value”: “Database properties”
}
]
}
],
“title”: “OFFLINE”,
“type”: “stat”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 2,
“x”: 8,
“y”: 1
},
“id”: 65,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: ,
“measurement”: “State SUSPECT”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT "Total" FROM "State SUSPECT" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
}
]
],
“tags”: [
{
“key”: “servername”,
“operator”: “=~”,
“value”: “/$Instance$/”
},
{
“condition”: “AND”,
“key”: “type”,
“operator”: “=”,
“value”: “Database properties”
}
]
}
],
“title”: “SUSPECT”,
“type”: “stat”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 2,
“x”: 10,
“y”: 1
},
“id”: 66,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: ,
“measurement”: “State RECOVERING”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT "Total" FROM "State RECOVERING" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
}
]
],
“tags”: [
{
“key”: “servername”,
“operator”: “=~”,
“value”: “/$Instance$/”
},
{
“condition”: “AND”,
“key”: “type”,
“operator”: “=”,
“value”: “Database properties”
}
]
}
],
“title”: “RECOVERING”,
“type”: “stat”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 2,
“x”: 12,
“y”: 1
},
“id”: 67,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: ,
“measurement”: “State RECOVERY_PENDING”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT "Total" FROM "State RECOVERY_PENDING" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
}
]
],
“tags”: [
{
“key”: “servername”,
“operator”: “=~”,
“value”: “/$Instance$/”
},
{
“condition”: “AND”,
“key”: “type”,
“operator”: “=”,
“value”: “Database properties”
}
]
}
],
“title”: “PENDING”,
“type”: “stat”
},
{
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 3,
“w”: 2,
“x”: 14,
“y”: 1
},
“id”: 68,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “10.0.1”,
“targets”: [
{
“alias”: “”,
“datasource”: {
“type”: “influxdb”,
“uid”: “b61f540c-7db3-4d54-80fb-cd8a39328fbe”
},
“dsType”: “influxdb”,
“groupBy”: ,
“measurement”: “State RESTORING”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT "Total" FROM "State RESTORING" WHERE "servername" =~ /$Instance$/ AND "type" = ‘Database properties’ AND $timeFilter”,
“refId”: “A”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“Total”
],
“type”: “field”
}
]
],
“tags”: [