Compare commits

...

3 Commits

Author SHA1 Message Date
kongfei
75b0fa4d47 update snmp 2023-06-21 14:46:37 +08:00
kongfei
b9e2c45d05 update 2023-06-21 12:06:31 +08:00
kongfei
2872408da4 snmp & smart dashboards 2023-06-21 12:04:51 +08:00
4 changed files with 1844 additions and 10 deletions

View File

@@ -0,0 +1,891 @@
{
"name": "SNMP Stats",
"tags": "",
"ident": "",
"configs": {
"version": "3.0.0",
"links": [],
"var": [
{
"name": "ident",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": 4
},
"definition": "label_values(snmp_interface_ifInOctets, ident)",
"reg": "",
"multi": false
},
{
"name": "role",
"label": "role",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": 4
},
"definition": "label_values(snmp_uptime,role)"
}
],
"panels": [
{
"type": "stat",
"id": "d5e905cf-da22-48be-9fca-1f92695ca730",
"layout": {
"h": 3,
"w": 8,
"x": 0,
"y": 0,
"i": "d5e905cf-da22-48be-9fca-1f92695ca730",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "snmp_uptime{ident=\"$ident\",role=\"$role\"} /100",
"legend": "In"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Uptime",
"links": [],
"description": "系统启动时间timetick转换为秒大盘自动转换为时 天 周 月……",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {
"util": "seconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "26ae7fc1-230e-451e-9415-ea93ae8b2abb",
"layout": {
"h": 3,
"w": 8,
"x": 8,
"y": 0,
"i": "26ae7fc1-230e-451e-9415-ea93ae8b2abb",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "max(irate(snmp_interface_ifOutOctets{ident=\"$ident\",role=\"$role\"}[5m]))",
"legend": "Out"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Max Out (Current)",
"links": [],
"description": "端口每秒最大出流量 单位是bit大盘自动转换",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "c5496f39-e194-401c-888c-556292e39254",
"layout": {
"h": 3,
"w": 8,
"x": 16,
"y": 0,
"i": "c5496f39-e194-401c-888c-556292e39254",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "max(irate(snmp_interface_ifInOctets{ident=\"$ident\",role=\"$role\"}[5m]))",
"legend": "In"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Max In (Current)",
"links": [],
"description": "端口每秒最大入流量",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "d755c99d-a323-41e6-8117-6bc006bef8b7",
"layout": {
"h": 3,
"w": 8,
"x": 0,
"y": 3,
"i": "bd2cd5b0-50ac-42d7-b29d-ea89ceb015a7",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "snmp_sys_cpu_usage{ident=\"$ident\",role=\"$role\"}",
"legend": "Out"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "CPU 使用率 %",
"links": [],
"description": "",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "c3991b49-1ad8-4f63-87b8-d41bbf729833",
"layout": {
"h": 3,
"w": 8,
"x": 8,
"y": 3,
"i": "109aad94-79bd-4aec-b8ac-db73cb6601a8",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "snmp_sys_mem_usage{ident=\"$ident\",role=\"$role\"}",
"legend": "mem_usage"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "内存使用率 %",
"links": [],
"description": "内存使用率 ",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "024c8f3e-b632-4177-9a71-396d81ede19e",
"layout": {
"h": 3,
"w": 8,
"x": 16,
"y": 3,
"i": "55c508d9-acaa-4bd2-a473-7b6176a5a44a",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "snmp_sys_mem_usage{ident=\"$ident\",role=\"$role\"}",
"legend": "mem_usage"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "并发连接数(当前)",
"links": [],
"description": "当前并发连接数",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "49e0453c-328c-4499-9097-a6bb52d92ad1",
"layout": {
"h": 3,
"w": 8,
"x": 0,
"y": 6,
"i": "c7ddd2b8-5803-4de0-a8e7-3466020684e9",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "snmp_sys_session_rate{ident=\"$ident\",role=\"$role\"}",
"legend": "mem_usage"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "每秒新建连接数",
"links": [],
"description": "最近10分钟平均每秒新建连接数",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "ad0d02bb-9eb0-47d8-8529-1ce66150e4f9",
"layout": {
"h": 3,
"w": 8,
"x": 8,
"y": 6,
"i": "ad0d02bb-9eb0-47d8-8529-1ce66150e4f9",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "max(delta(snmp_interface_ifOutOctets{ident=\"$ident\",role=\"$role\"}[1m]))",
"legend": "Out"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Total Out",
"links": [],
"description": "最近1分钟总计出流量",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "616de58a-70a7-4c0b-b0f2-5151b9f0e9c5",
"layout": {
"h": 3,
"w": 8,
"x": 16,
"y": 6,
"i": "616de58a-70a7-4c0b-b0f2-5151b9f0e9c5",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "max(delta(snmp_interface_ifInOctets{role=\"$role\",ident=\"$ident\"}[1m]))",
"legend": "In"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Total In",
"links": [],
"description": "最近1分钟总计入流量",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "fcdf91de-394f-4d9c-abb9-d750583ce6cf",
"layout": {
"h": 3,
"w": 8,
"x": 0,
"y": 9,
"i": "da757839-0fc0-4d1b-b486-7070aa3d70f8",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "sum(irate(snmp_interface_ifInDiscards{role=\"$role\",ident=\"$ident\"}[1m]))",
"legend": "In"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Drop Packets (In)",
"links": [],
"description": "入方向1m内丢包数",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "stat",
"id": "b5d3c6de-6512-40d2-b167-a1e00bfaa795",
"layout": {
"h": 3,
"w": 8,
"x": 8,
"y": 9,
"i": "ab9b1070-a81a-4a30-9dcd-7071dfafcdc6",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "sum(irate(snmp_interface_ifOutDiscards{role=\"$role\",ident=\"$ident\"}[1m]))",
"legend": "In"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Drop Packets (Out)",
"links": [],
"description": "出方向1m的丢包数",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "barGauge",
"id": "a925c635-0ff8-4984-a8b0-ca99948960f0",
"layout": {
"h": 9,
"w": 12,
"x": 0,
"y": 12,
"i": "a925c635-0ff8-4984-a8b0-ca99948960f0",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "B",
"expr": "irate(snmp_interface_ifOutOctets{ident=\"$ident\",role=\"$role\"}[5m])",
"legend": "{{ifDescr}}( {{ifIndex}})"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Out (Current)",
"links": [],
"description": "Max: 10MB \nRed Status: 9MB",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"standardOptions": {}
}
},
{
"type": "barGauge",
"id": "86345d37-977a-44e0-96ca-e46fe388b529",
"layout": {
"h": 9,
"w": 12,
"x": 12,
"y": 12,
"i": "86345d37-977a-44e0-96ca-e46fe388b529",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "B",
"expr": "irate(snmp_interface_ifInOctets{ident=\"$ident\",role=\"$role\"}[5m])",
"legend": "{{ifDescr}}({{ifIndex}})"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "In (Current)",
"links": [],
"description": "Max: 10MB \nRed Status: 9MB",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"standardOptions": {}
}
},
{
"type": "timeseries",
"id": "4bd4c3ad-e00f-4eac-89fc-6b146f36d922",
"layout": {
"h": 10,
"w": 24,
"x": 0,
"y": 21,
"i": "4bd4c3ad-e00f-4eac-89fc-6b146f36d922",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "irate(snmp_interface_ifOutOctets{ident=\"$ident\",role=\"$role\"}[5m])",
"legend": "Out: {{ifDescr}} "
},
{
"refId": "B",
"expr": "-irate(snmp_interface_ifInOctets{ident=\"$ident\",role=\"$role\"}[5m])",
"legend": "In: {{ifDescr}} "
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Out / In",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.5,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "table",
"id": "b663d53d-41a9-4e28-a60e-6ced1b9d46ce",
"layout": {
"h": 10,
"w": 24,
"x": 0,
"y": 31,
"i": "b663d53d-41a9-4e28-a60e-6ced1b9d46ce",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "snmp_interface_ifOperStatus{ident=\"$ident\",role=\"$role\"}",
"legend": "out"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Interface Status",
"links": [],
"maxPerRow": 4,
"custom": {
"showHeader": true,
"colorMode": "value",
"calc": "lastNotNull",
"displayMode": "labelsOfSeriesToRows",
"columns": [
"shop",
"role",
"ifIndex",
"value"
],
"sortColumn": "ifDescr",
"sortOrder": "ascend"
},
"options": {
"valueMappings": [
{
"type": "special",
"result": {
"color": "#3fc453",
"text": "UP"
},
"match": {
"special": 1
}
},
{
"type": "special",
"result": {
"color": "#ce4f52",
"text": "DOWN"
},
"match": {
"special": 2
}
},
{
"type": "special",
"result": {
"color": "#9470ff",
"text": "TESTING"
},
"match": {
"special": 3
}
},
{
"type": "special",
"result": {
"color": "#000000",
"text": "UNKNOWN"
},
"match": {
"special": 4
}
},
{
"type": "special",
"result": {
"color": "#ffae39",
"text": "DORMANT"
},
"match": {
"special": 5
}
},
{
"type": "special",
"result": {
"color": "#e6c627",
"text": "NotPresent"
},
"match": {
"special": 6
}
},
{
"type": "special",
"result": {
"color": "#ff8286",
"text": "LowerLayerDown"
},
"match": {
"special": 7
}
}
],
"standardOptions": {}
},
"overrides": [
{}
]
}
]
}
}

View File

@@ -1,10 +0,0 @@
{
"name": "占位的,等待老炮 PR",
"tags": "",
"ident": "",
"configs": {
"var": [],
"panels": [],
"version": "3.0.0"
}
}

View File

@@ -0,0 +1,953 @@
{
"name": "S.M.A.R.T Dashboard",
"tags": "",
"ident": "",
"configs": {
"version": "3.0.0",
"links": [],
"var": [
{
"name": "ident",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": 4
},
"definition": "label_values(smart_device_temp_c,ident)",
"reg": "",
"multi": false
},
{
"name": "device",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": 4
},
"definition": "label_values(smart_device_temp_c, device)",
"reg": "",
"multi": false
}
],
"panels": [
{
"version": "3.0.0",
"id": "2a2c3cec-5699-4860-a31d-14814371482c",
"type": "row",
"name": "【 General 】",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 0,
"i": "2a2c3cec-5699-4860-a31d-14814371482c",
"isResizable": false
},
"panels": []
},
{
"type": "stat",
"id": "c9d829c1-240f-46c1-8269-82879081eea2",
"layout": {
"h": 4,
"w": 4,
"x": 0,
"y": 1,
"i": "c9d829c1-240f-46c1-8269-82879081eea2",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "count(smart_device_temp_c{ident=\"$ident\"})"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Disk Drives Monitored",
"links": [],
"description": "设备数量",
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "table",
"id": "24fbb1bf-9817-4fa0-9525-17dd4fa2a710",
"layout": {
"h": 8,
"w": 20,
"x": 4,
"y": 1,
"i": "24fbb1bf-9817-4fa0-9525-17dd4fa2a710",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "smart_device_temp_c{ident=\"$ident\"}",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Disk Drives List",
"links": [],
"maxPerRow": 4,
"custom": {
"showHeader": true,
"colorMode": "value",
"calc": "lastNotNull",
"displayMode": "labelsOfSeriesToRows",
"columns": [
"shop",
"ident",
"device",
"capacity",
"serial_no",
"wwn",
"model",
"enabled",
"value"
]
},
"options": {
"standardOptions": {}
},
"overrides": [
{}
]
},
{
"type": "stat",
"id": "b9f030af-0c68-45e5-9f64-d4b4216c3ef0",
"layout": {
"h": 4,
"w": 4,
"x": 0,
"y": 5,
"i": "b9f030af-0c68-45e5-9f64-d4b4216c3ef0",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "count(smart_device_temp_c{ident=~\"$ident\"})-count(smart_device_health_ok{ident=~\"$ident\"})",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Unhealthy Disks",
"links": [],
"maxPerRow": 4,
"custom": {
"textMode": "value",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"version": "3.0.0",
"id": "e17b3260-b43d-4733-9e89-c91caf3689cf",
"type": "row",
"name": "【 Temperature 】",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 9,
"i": "e17b3260-b43d-4733-9e89-c91caf3689cf",
"isResizable": false
},
"panels": []
},
{
"type": "timeseries",
"id": "2df514d0-6858-48d4-b2fc-ed6c4932cb33",
"layout": {
"h": 11,
"w": 12,
"x": 0,
"y": 10,
"i": "2df514d0-6858-48d4-b2fc-ed6c4932cb33",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(smart_device_temp_c{ ident=\"$ident\"}, \"ident\", \"$1\", \"ident\", \"([^.]+).*\")",
"legend": "【{{ident}}】 {{device}} {{model}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Temperature History",
"links": [],
"description": "",
"repeat": null,
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.5,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "barGauge",
"id": "e028227f-cf3d-4f4e-abc6-96e16d2508c3",
"layout": {
"h": 11,
"w": 12,
"x": 12,
"y": 10,
"i": "e028227f-cf3d-4f4e-abc6-96e16d2508c3",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(label_replace(smart_device_temp_c{ ident=~\"$ident\"}, \"ident\", \"$1\", \"ident\", \"([^.]+).*\"), \"device\", \"$1\", \"device\", \"(.*)\")",
"legend": "{{ident}}: {{device}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Temperature Bar",
"links": [],
"maxPerRow": 4,
"custom": {
"calc": "avg",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"valueMappings": [],
"standardOptions": {
"util": "none",
"min": "0",
"max": "80",
"decimals": 1
}
}
},
{
"version": "3.0.0",
"id": "7ce33f1a-85a0-4d0b-a696-caf679e1fa82",
"type": "row",
"name": "【 Wear and Tear 】",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 21,
"i": "7ce33f1a-85a0-4d0b-a696-caf679e1fa82",
"isResizable": false
},
"panels": []
},
{
"type": "barGauge",
"id": "c270b82c-610b-4f58-bba3-0ed2838cc925",
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 22,
"i": "c270b82c-610b-4f58-bba3-0ed2838cc925",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(smart_attribute_power_on_hours{ident=~\"$ident\" }, \"ident\", \"$1\", \"ident\", \"([^.]+).*\")",
"legend": "【{{ident}} {{device}}】"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Power On Hours",
"links": [],
"description": "通电时间",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"valueMappings": [],
"standardOptions": {
"util": "none",
"min": 0,
"max": "17520",
"decimals": 2
}
}
},
{
"type": "barGauge",
"id": "33f83d64-23be-4d58-807a-4a3570da8b97",
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 22,
"i": "33f83d64-23be-4d58-807a-4a3570da8b97",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(smart_attribute_power_cycle_count{ ident=~\"$ident\"}, \"ident\", \"$1\", \"ident\", \"([^.]+).*\")",
"legend": "【{{ident}} {{device}}】"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Power Cycle Count",
"links": [],
"description": "通电次数",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"valueMappings": [],
"standardOptions": {
"util": "none",
"min": 0,
"max": 2000,
"decimals": 0
}
}
},
{
"type": "barGauge",
"id": "20700be8-a0d8-4cef-84c5-cecef88bcbc9",
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 28,
"i": "20700be8-a0d8-4cef-84c5-cecef88bcbc9",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(smart_attribute_unexpect_power_loss_ct{ ident=~\"$ident\"}, \"ident\", \"$1\", \"ident\", \"([^.]+).*\")",
"legend": "【{{ident}} {{device}}】"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Power Loss Count",
"links": [],
"description": "非预期掉电次数统计",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"valueMappings": [],
"standardOptions": {
"util": "none",
"max": 2500
}
}
},
{
"version": "3.0.0",
"id": "c9474027-b555-4085-89e8-56c2521919c7",
"type": "row",
"name": "【 Errors 】",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 34,
"i": "c9474027-b555-4085-89e8-56c2521919c7",
"isResizable": false
},
"panels": []
},
{
"type": "barGauge",
"id": "9f364792-45b4-444c-be76-20714396eadc",
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 35,
"i": "9f364792-45b4-444c-be76-20714396eadc",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(smart_device_read_error_rate{ ident=~\"$ident\" }, \"ident\", \"$1\", \"ident\", \"([^.]+).*\")",
"legend": "【{{ident}} {{device}}】"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Raw Read Error",
"links": [],
"description": "",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"valueMappings": [],
"standardOptions": {
"util": "none",
"max": 20000
}
}
},
{
"type": "timeseries",
"id": "074ffe0a-7bda-4ac0-867a-08ba44a8c4fb",
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 35,
"i": "074ffe0a-7bda-4ac0-867a-08ba44a8c4fb",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "B",
"expr": "sum( smart_device_reallocated_sectors_count{ ident=~\"$ident\"})",
"legend": "smart_device_reallocated_sectors_count"
},
{
"refId": "C",
"expr": "sum( smart_attribute_reallocated_event_count{ ident=~\"$ident\" })",
"legend": "smart_attribute_reallocated_event_count"
},
{
"refId": "D",
"expr": "sum(smart_device_read_error_rate{ ident=~\"$ident\" })",
"legend": "smart_device_read_error_rate"
},
{
"refId": "E",
"expr": "sum(smart_device_pending_sector_count{ ident=~\"$ident\" })",
"legend": "smart_device_pending_sector_count"
},
{
"refId": "F",
"expr": "sum(smart_device_uncorrectable_errors{ ident=~\"$ident\"})",
"legend": "smart_device_uncorrectable_errors"
},
{
"refId": "G",
"expr": "sum(smart_device_udma_crc_errors{ ident=\"$ident\" })",
"legend": "smart_device_udma_crc_errors"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Total Errors",
"links": [],
"description": "Aggregated graph for all types of errors",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.5,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "barGauge",
"id": "f2d6fe6e-3cd5-4b5a-9978-6dcf3be45b39",
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 41,
"i": "f2d6fe6e-3cd5-4b5a-9978-6dcf3be45b39",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 4,
"targets": [
{
"refId": "A",
"expr": "label_replace(smart_device_udma_crc_errors{ ident=~\"$ident\"}, \"ident\", \"$1\", \"ident\", \"([^.]+).*\")",
"legend": "【{{ident}} {{device}}】"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "UDMA CRC Error",
"links": [],
"description": "",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 20,
"sortOrder": "desc"
},
"options": {
"valueMappings": [],
"standardOptions": {
"util": "none",
"max": 2500
}
}
},
{
"version": "3.0.0",
"id": "5e2273be-0948-47b6-acc4-5d460384813e",
"type": "row",
"name": "【 SAS-specific Errors 】",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 47,
"i": "5e2273be-0948-47b6-acc4-5d460384813e",
"isResizable": false
},
"panels": []
},
{
"version": "3.0.0",
"id": "2d4d0c4e-9bc6-4dd6-bd28-7b0ce47c2bd1",
"type": "barGauge",
"name": "SAS grown defects",
"description": "Grown defects are drive blocks that have been marked bad once the drive has been in use",
"links": [],
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 48,
"i": "2d4d0c4e-9bc6-4dd6-bd28-7b0ce47c2bd1",
"isResizable": true
},
"targets": [
{
"refId": "A",
"expr": "label_replace(smartmon_sas_grown_defects_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" }, \"instance\", \"$1\", \"instance\", \"([^.]+).*\")",
"legend": "{{name}} 【{{instance}} {{disk}}】"
}
],
"options": {
"valueMappings": [],
"thresholds": {
"mode": "absolute",
"style": "line",
"steps": [
{
"color": "#73BF69",
"value": null,
"type": "base"
},
{
"color": "#FADE2A",
"value": 800
},
{
"color": "#F2495C",
"value": 2000
}
]
},
"standardOptions": {
"util": "none",
"max": 2000
},
"legend": {
"displayMode": "list"
},
"tooltip": {
"mode": "multi"
}
},
"custom": {
"version": "3.0.0",
"calc": "mean"
},
"maxPerRow": 4
},
{
"version": "3.0.0",
"id": "9f80056a-5d5b-41e7-90aa-5ba75e71cbf4",
"type": "timeseries",
"name": "SAS Total Errors",
"description": "Aggregated graph for all types of SAS errors",
"links": [],
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 48,
"i": "9f80056a-5d5b-41e7-90aa-5ba75e71cbf4",
"isResizable": true
},
"targets": [
{
"refId": "K",
"expr": "sum(smartmon_sas_grown_defects_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" } )",
"legend": "sas_grown_defects_count"
},
{
"refId": "L",
"expr": "sum(smartmon_sas_non_medium_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" } )",
"legend": "sas_non_medium_errors_count"
},
{
"refId": "M",
"expr": "sum(smartmon_sas_read_uncorrected_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" } )",
"legend": "sas_read_uncorrected_errors_count"
},
{
"refId": "A",
"expr": "sum(smartmon_sas_verify_uncorrected_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" })",
"legend": "sas_verify_uncorrected_errors_count"
},
{
"refId": "B",
"expr": "sum(smartmon_sas_write_uncorrected_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" })",
"legend": "sas_write_uncorrected_errors_count"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
},
"maxPerRow": 4
},
{
"version": "3.0.0",
"id": "f24e5f2d-0b7c-43bc-9a12-c7f4fa62d25a",
"type": "barGauge",
"name": "SAS Non-Medium Errors",
"description": "SCSI command errors which might be related to bad cable, backplane or card",
"links": [],
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 54,
"i": "f24e5f2d-0b7c-43bc-9a12-c7f4fa62d25a",
"isResizable": true
},
"targets": [
{
"refId": "A",
"expr": "label_replace(smartmon_sas_non_medium_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" }, \"instance\", \"$1\", \"instance\", \"([^.]+).*\")",
"legend": "{{name}} 【{{instance}} {{disk}}】"
}
],
"options": {
"valueMappings": [],
"thresholds": {
"mode": "absolute",
"style": "line",
"steps": [
{
"color": "#73BF69",
"value": null,
"type": "base"
},
{
"color": "#FADE2A",
"value": 800
},
{
"color": "#F2495C",
"value": 2000
}
]
},
"standardOptions": {
"util": "none",
"max": 2000
},
"legend": {
"displayMode": "list"
},
"tooltip": {
"mode": "multi"
}
},
"custom": {
"version": "3.0.0",
"calc": "mean"
},
"maxPerRow": 4
},
{
"version": "3.0.0",
"id": "7882d995-95c3-411d-9a9e-237d60c52ba1",
"type": "barGauge",
"name": "SAS Uncorrected Errors Total (read/write/verify)",
"description": "Specifies the counter that contains the total number of blocks for which an uncorrected data error has occurred",
"links": [],
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 54,
"i": "7882d995-95c3-411d-9a9e-237d60c52ba1",
"isResizable": true
},
"targets": [
{
"refId": "A",
"expr": "label_replace(sum (smartmon_sas_read_uncorrected_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" } + smartmon_sas_write_uncorrected_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" } + smartmon_sas_verify_uncorrected_errors_count_raw_value{ instance=~\"$instance\", disk=~\"$disk\" }) by (instance, disk, name), \"instance\", \"$1\", \"instance\", \"([^.]+).*\")",
"legend": "{{name}} 【{{instance}} {{disk}}】"
}
],
"options": {
"valueMappings": [],
"thresholds": {
"mode": "absolute",
"style": "line",
"steps": [
{
"color": "#73BF69",
"value": null,
"type": "base"
},
{
"color": "#FADE2A",
"value": 800
},
{
"color": "#F2495C",
"value": 2000
}
]
},
"standardOptions": {
"util": "none",
"max": 2000
},
"legend": {
"displayMode": "list"
},
"tooltip": {
"mode": "multi"
}
},
"custom": {
"version": "3.0.0",
"calc": "mean"
},
"maxPerRow": 4
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB