diff --git a/inputs/switch_legacy/README.md b/inputs/switch_legacy/README.md index 84e19d4a..cfab03e6 100644 --- a/inputs/switch_legacy/README.md +++ b/inputs/switch_legacy/README.md @@ -36,3 +36,7 @@ ips = [ ## 自定义 oid `[[instances.customs]]` 部分可以配置多个,表示自定义 oid,默认情况下,该插件采集的都是设备各个网口的监控数据以及CPU和内存的使用率,如果要采集别的 oid,就需要使用这个自定义功能 + +## 监控大盘 + +社区有小伙伴帮忙做了一个监控大盘,就在该 README 同级目录下,大家可以导入夜莺使用 \ No newline at end of file diff --git a/inputs/switch_legacy/dashboard.json b/inputs/switch_legacy/dashboard.json new file mode 100644 index 00000000..73743319 --- /dev/null +++ b/inputs/switch_legacy/dashboard.json @@ -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" + } +} \ No newline at end of file