Skip to content

Commit

Permalink
add switch dashboard.json
Browse files Browse the repository at this point in the history
  • Loading branch information
UlricQin committed Jun 30, 2022
1 parent 60c5054 commit 3a1a9fa
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inputs/switch_legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ ips = [
## 自定义 oid

`[[instances.customs]]` 部分可以配置多个,表示自定义 oid,默认情况下,该插件采集的都是设备各个网口的监控数据以及CPU和内存的使用率,如果要采集别的 oid,就需要使用这个自定义功能

## 监控大盘

社区有小伙伴帮忙做了一个监控大盘,就在该 README 同级目录下,大家可以导入夜莺使用
143 changes: 143 additions & 0 deletions inputs/switch_legacy/dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"name": "通用交换机",
"tags": "",
"configs": {
"var": [
{
"name": "IP",
"definition": "label_values(switch_legacy_cpu_util,ip)",
"multi": false
}
],
"panels": [
{
"targets": [
{
"refId": "A",
"expr": "switch_legacy_cpu_util{ip=\"$IP\"}",
"legend": "cpu_util"
}
],
"name": "CPU",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"fillOpacity": 0.5,
"stack": "off"
},
"version": "2.0.0",
"type": "timeseries",
"layout": {
"h": 4,
"w": 11,
"x": 1,
"y": 0,
"i": "23220dc3-ab9a-40f9-b1d3-135bb3bbb734",
"isResizable": true
},
"id": "23220dc3-ab9a-40f9-b1d3-135bb3bbb734"
},
{
"targets": [
{
"refId": "A",
"expr": "switch_legacy_mem_util{ip=\"$IP\"}",
"legend": "mem_util"
}
],
"name": "内存",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"fillOpacity": 0.5,
"stack": "off"
},
"version": "2.0.0",
"type": "timeseries",
"layout": {
"h": 4,
"w": 11,
"x": 12,
"y": 0,
"i": "7f36ea1c-fd51-43bf-93ab-2787d630c530",
"isResizable": true
},
"id": "7f36ea1c-fd51-43bf-93ab-2787d630c530"
},
{
"targets": [
{
"refId": "A",
"expr": "switch_legacy_if_in{ip=\"$IP\"}",
"legend": "入流量"
},
{
"expr": "switch_legacy_if_out{ip=\"$IP\"}",
"refId": "B",
"legend": "出流量"
}
],
"name": "端口流量",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsIEC"
},
"thresholds": {}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"fillOpacity": 0.5,
"stack": "off"
},
"version": "2.0.0",
"type": "timeseries",
"layout": {
"h": 4,
"w": 22,
"x": 1,
"y": 4,
"i": "3d0263b1-e79e-45bd-9bea-380892fca44f",
"isResizable": true
},
"id": "3d0263b1-e79e-45bd-9bea-380892fca44f"
}
],
"version": "2.0.0"
}
}

0 comments on commit 3a1a9fa

Please sign in to comment.