{
"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": 3,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"fillOpacity": 70,
"lineWidth": 1
},
"displayName": "每分钟",
"mappings": [],
"max": 1,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 0
},
"id": 14,
"options": {
"colWidth": 0.9,
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"rowHeight": 0.9,
"showValue": "auto",
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"formatType": "Time series",
"queryType": "SQL",
"refId": "A",
"sql": "select _wstart, count(*)/60 from opcdemo.$metric01 where _c0 >= $from and _c0 < $to interval(1m) limit 100 offset 1"
}
],
"title": "$metric01 数采完备率-分钟级",
"transparent": true,
"type": "status-history"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 0.998
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 7,
"x": 12,
"y": 0
},
"id": 15,
"options": {
"colorMode": "background_solid",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {
"valueSize": 75
},
"textMode": "auto"
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"formatType": "Time series",
"queryType": "SQL",
"refId": "A",
"sql": "select count(*)/(spread(_c0 )/1000+1) from opcdemo.$metric01 where _c0 >= $from and _c0 < $to"
}
],
"title": "$metric01 数采完备率-整体",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"color": "red",
"index": 1,
"text": "Offline"
},
"1": {
"color": "green",
"index": 0,
"text": "Online"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 19,
"y": 0
},
"id": 17,
"options": {
"colorMode": "background",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {
"valueSize": 60
},
"textMode": "auto"
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"formatType": "Time series",
"queryType": "SQL",
"refId": "A",
"sql": "select count(*) from (select last_row(*) from opcdemo.$metric01 where _c0 >= now-$offline_thresholds)"
}
],
"title": "$metric01 在线状态",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"displayName": "冷床出口水分",
"mappings": [],
"max": 15,
"min": 10,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "humidity"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 7,
"x": 0,
"y": 6
},
"id": 2,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"hide": false,
"queryType": "SQL",
"refId": "A",
"sql": "select last_row(val) from opcdemo.$metric01",
"timeShiftPeriod": ""
}
],
"title": "$metric01",
"type": "gauge"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"decimals": 0,
"displayName": "DB3005工艺流量",
"mappings": [],
"max": 6500,
"min": 5000,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "kg/h"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 8,
"x": 7,
"y": 6
},
"id": 4,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"queryType": "SQL",
"refId": "A",
"sql": "select last_row(val) from opcdemo.$metric02"
}
],
"title": "$metric02",
"type": "gauge"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"displayName": "烘丝出口温度",
"mappings": [],
"max": 68,
"min": 50,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "celsius"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 8,
"x": 15,
"y": 6
},
"id": 6,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"queryType": "SQL",
"refId": "A",
"sql": "select last_row(val) from opcdemo.$metric03"
}
],
"title": "$metric03",
"type": "gauge"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd",
"seriesBy": "last"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": -1,
"drawStyle": "line",
"fillOpacity": 36,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": 2000,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "line+area"
}
},
"displayName": "冷床出口水分",
"mappings": [],
"max": 15,
"min": 0,
"noValue": "-",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 14
}
]
},
"unit": "humidity"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 23,
"x": 0,
"y": 11
},
"id": 8,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"queryType": "SQL",
"refId": "A",
"sql": "select _wstart, avg(val) from opcdemo.$metric01 where _c0 >= $from and _c0 < $to interval($interval) fill(null)"
}
],
"title": "$metric01",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": 2000,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"displayName": "DB3005工艺流量",
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "kg/h"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 23,
"x": 0,
"y": 20
},
"id": 10,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"formatType": "Time series",
"queryType": "SQL",
"refId": "A",
"sql": "select _wstart, avg(val) from opcdemo.$metric02 where _c0 >= $from and _c0 < $to interval($interval) fill(null)"
}
],
"title": "$metric02",
"type": "timeseries"
},
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "scheme",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "smooth",
"lineWidth": 3,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": 2000,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"displayName": "烘丝出口温度",
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "celsius"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 23,
"x": 0,
"y": 29
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "tdengine-datasource",
"uid": "PCDB1A4F820EAA3DF"
},
"queryType": "SQL",
"refId": "A",
"sql": "select _wstart, avg(val) from opcdemo.$metric03 where _c0 >= $from and _c0 < $to interval($interval) fill(null)"
}
],
"title": "$metric03",
"type": "timeseries"
}
],
"refresh": "2s",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": "d_1008",
"value": "d_1008"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "metric01",
"options": [
{
"selected": true,
"text": "d_1008",
"value": "d_1008"
},
{
"selected": false,
"text": "d_1011",
"value": "d_1011"
},
{
"selected": false,
"text": "d_1014",
"value": "d_1014"
}
],
"query": "d_1008,d_1011,d_1014",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "d_1009",
"value": "d_1009"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "metric02",
"options": [
{
"selected": true,
"text": "d_1009",
"value": "d_1009"
},
{
"selected": false,
"text": "d_1012",
"value": "d_1012"
},
{
"selected": false,
"text": "d_1015",
"value": "d_1015"
}
],
"query": "d_1009,d_1012,d_1015",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "d_1010",
"value": "d_1010"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "metric03",
"options": [
{
"selected": true,
"text": "d_1010",
"value": "d_1010"
},
{
"selected": false,
"text": "d_1013",
"value": "d_1013"
},
{
"selected": false,
"text": "d_1016",
"value": "d_1016"
}
],
"query": "d_1010,d_1013,d_1016",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "5",
"value": "5"
},
"description": "离线阈值(秒)",
"hide": 0,
"includeAll": false,
"label": "离线阈值(秒)",
"multi": false,
"name": "offline_threshold",
"options": [
{
"selected": false,
"text": "3",
"value": "3"
},
{
"selected": true,
"text": "5",
"value": "5"
},
{
"selected": false,
"text": "10",
"value": "10"
},
{
"selected": false,
"text": "30",
"value": "30"
},
{
"selected": false,
"text": "60",
"value": "60"
}
],
"query": "3,5,10,30,60",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
}
]
},
"time": {
"from": "now-15m",
"to": "now"
},
"timepicker": {
"hidden": false,
"refresh_intervals": [
"1s",
"2s",
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h"
]
},
"timezone": "cst",
"title": "OPC Demo",
"uid": "wT5o7LzIz",
"version": 59,
"weekStart": ""
}