Featured image of post 使用Prometheus监控Padavan路由器

使用Prometheus监控Padavan路由器

监控路由器、背景近期在群辉中安装一套监控程序,目前已经监控,然后家中有有路由器型号,也准备使用进行监控。环境::::固件版本、监控步骤、正确使用地址:有两种方式不是放到系统上的安装到操作系统,通过连接。。。。。。。

Prometheus监控Padavan路由器

1、背景

近期在Synology(群辉)中安装一套Prometheus监控程序,目前已经监控Synology,然后家中有有路由器(Padavan)型号,也准备使用Prometheus+Grafan进行监控。

环境:

Prometheus:2.48.0

Grafan:10

Padavan:固件版本:3.4.3.9-099_22-05-1

image

2、监控步骤

1、padavan_exporter 正确使用

地址:https://github.com/Bpazy/padavan_exporter/blob/master/README-zh_CN.md

padavan_exporter有两种方式(不是放到Padavan系统上的)

  1. 安装到Linux操作系统,通过ssh连接到路由器进行数据获取
  2. 安装到Docker上,通过ssh连接到路由器进行数据获取

Linux操作系统

在Linux操作系统下载padavan_exporter

参数使用

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
$ ./padavan_exporter --help
Flags:
  --help                        Show context-sensitive help (also try
                                --help-long and --help-man).
  --web.listen-address=":9100"  Address on which to expose metrics and web
                                interface
  --padavan.ssh.host="127.0.0.1:22"
                                Padavan ssh host
  --padavan.ssh.username="admin"
                                Padavan ssh username
  --padavan.ssh.password="admin"
                                Padavan ssh password
  --debug                       Debug mode

安装 padavan_exporter 并使用正确的参数启动(点击跳转项目首页)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
wget https://github.com/Bpazy/padavan_exporter/releases/download/v0.0.2/padavan_exporter-linux-amd64-v0.0.2
sudo mv ./padavan_exporter-linux-amd64-v0.0.2 /usr/local/bin/padavan_exporter
sudo chmod u=rwx,o=rx,g=rx /usr/local/bin/padavan_exporter
sudo chgrp root /usr/local/bin/padavan_exporter
sudo chown root /usr/local/bin/padavan_exporter

# 自定义 systemd service
sudo touch /lib/systemd/system/padavan_exporter.service
sudo cat <<EOF >/lib/systemd/system/padavan_exporter.service
[Unit]
Description=Node exporter
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/padavan_exporter  --padavan.ssh.host="127.0.0.1:22"  --padavan.ssh.username="admin"  --padavan.ssh.password="admin"
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF

# 加载自定义的 service
sudo systemctl daemon-reload
# 开机自启
sudo systemctl enable padavan_exporter 
# 启动
sudo systemctl start padavan_exporter 

Docker Compose(推荐)

当然更好的方式是使用 Docker Compose,你可以参考本项目预置的 docker-compose.yml 文件。

此处要注意,我把9100端口 映射到 9101,因为 我的 9100端口已经被占用,你们要注意

1
2
3
4
5
6
7
8
version: '3'
services:
 padavan_exporter:
  image: bpazy/padavan_exporter:latest
  restart: always
  ports:
      - "9101:9100"
  command: ["--padavan.ssh.host=192.168.123.1:22", "--padavan.ssh.username=admin", "--padavan.ssh.password=admin"]

image

测试数据

image

Prometheus修改配置重载

1
2
3
4

  - job_name: 'padavan'
    static_configs:
    - targets: ['192.168.123.200:9101']

2、Grafana 导入图形

这个图在Dashboard: https://grafana.com/grafana/dashboards/15978 进行修改 根补充

Padavan

如果导入没数据,请编辑 在这里插入图片描述

然后在Prometheus上进行调试 在这里插入图片描述

下载Json文件导入 Padavan-1701611865144.json

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "10.2.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series"
    }
  ],
  "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": "Padavan exporter's Dashboard 南宫乘风 fix ",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 15978,
  "graphTooltip": 2,
  "id": null,
  "links": [
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": false,
      "keepTime": false,
      "tags": [],
      "targetBlank": false,
      "title": "如果不显示数据,请手动修改 页面中的标签数据(请点击,请查询博客教程)",
      "tooltip": "",
      "type": "link",
      "url": "https://blog.csdn.net/heian_99"
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 9,
      "panels": [],
      "title": "基础信息",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": true,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "负载",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 2,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 11,
        "x": 0,
        "y": 1
      },
      "id": 15,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "node_load1{job=\"padavan\"}",
          "instant": false,
          "legendFormat": "1分钟负载",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "node_load5{job=\"padavan\"}",
          "hide": false,
          "instant": false,
          "legendFormat": "5分钟负载",
          "range": true,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "node_load15{job=\"padavan\"}",
          "hide": false,
          "instant": false,
          "legendFormat": "15分钟负载",
          "range": true,
          "refId": "C"
        }
      ],
      "title": "设备负载",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 25,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "fieldMinMax": true,
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 11,
        "y": 1
      },
      "id": 14,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "min",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "100- (\r\n  (\r\n    sum without (mode) (rate(node_cpu_seconds_total{job=\"padavan\", cpu=\"cpu\"}[5m]))\r\n    -\r\n    sum without (mode) (rate(node_cpu_seconds_total{job=\"padavan\",cpu=\"cpu\", mode=\"idle\"}[5m]))\r\n  ) / \r\n  sum without (mode) (rate(node_cpu_seconds_total{job=\"padavan\",cpu=\"cpu\"}[5m]))\r\n) * 100",
          "instant": false,
          "legendFormat": "cpu使用率",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "CPU使用率",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "1H路由器数据",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": true,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 100,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "percent"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 2,
          "fieldMinMax": false,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 11,
        "x": 0,
        "y": 10
      },
      "id": 8,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.2.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "increase(node_network_receive_bytes_total{job=\"padavan\",device=~'br0|eth2.2'}[1h])",
          "format": "time_series",
          "interval": "30m",
          "legendFormat": "{{device}} 下载",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "increase(node_network_transmit_bytes_total{job=\"padavan\",device=~'eth2|br0|eth2.2'}[1h])",
          "interval": "30m",
          "legendFormat": "{{device}}  上传",
          "range": true,
          "refId": "B"
        }
      ],
      "title": "1H路由器数据",
      "type": "timeseries"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 11,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "10.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:250",
          "alias": "ppp0 receive rate",
          "color": "#5794F2",
          "fill": 0,
          "yaxis": 2
        },
        {
          "$$hashKey": "object:251",
          "alias": "ppp0 receive total",
          "color": "#B877D9"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "increase(node_network_receive_bytes_total{job=\"padavan\", device=~\"eth2.2|br0\"}[1000w])",
          "interval": "",
          "legendFormat": "{{device}} 接收总数",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "rate(node_network_receive_bytes_total{device=~\"eth2.2|br0\", job=\"padavan\"}[1m])",
          "interval": "",
          "legendFormat": "{{device}}  接收速率",
          "range": true,
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "网络下载总计",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:268",
          "format": "decbytes",
          "label": "Receive Total",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:269",
          "format": "Bps",
          "label": "Receive Rate",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 11,
        "x": 0,
        "y": 19
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "10.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:824",
          "alias": "ppp0 download bandwidth",
          "color": "#5794F2"
        },
        {
          "$$hashKey": "object:825",
          "alias": "ppp0 upload bandwidth",
          "color": "#73BF69"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "rate(node_network_transmit_bytes_total{device=~\"eth2.2|br0\",  job=\"padavan\"}[1m])*8",
          "instant": false,
          "interval": "",
          "legendFormat": "{{device}} 上传",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "rate(node_network_receive_bytes_total{device=~\"eth2.2|br0\",  job=\"padavan\"}[1m])*8",
          "instant": false,
          "interval": "",
          "legendFormat": "{{device}} 下载",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "网络带宽",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:838",
          "format": "decbits",
          "label": "",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:839",
          "format": "short",
          "label": "",
          "logBase": 1,
          "show": false
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 11,
        "y": 19
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "10.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:723",
          "alias": "ppp0 transmit rate",
          "color": "#73BF69",
          "fill": 0,
          "yaxis": 2
        },
        {
          "$$hashKey": "object:724",
          "alias": "ppp0 transmit total",
          "color": "#B877D9"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "increase(node_network_transmit_bytes_total{job=\"padavan\",  device=~\"eth2.2|br0\"}[1000w])",
          "interval": "",
          "legendFormat": "{{device}} 上传总计",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "rate(node_network_transmit_bytes_total{device=~\"eth2.2|br0\", job=\"padavan\"}[1m])",
          "interval": "",
          "legendFormat": "{{device}} 上传速率",
          "range": true,
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "网络上传总计",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:741",
          "format": "decbytes",
          "label": "Transmit Total",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:742",
          "format": "Bps",
          "label": "Transmit Rate",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": 0
      }
    }
  ],
  "refresh": "10s",
  "schemaVersion": 38,
  "tags": [
    "jokersy"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Padavan",
  "uid": "5BoX3my7z",
  "version": 30,
  "weekStart": ""
}