79 lines
5.2 KiB
JSON
79 lines
5.2 KiB
JSON
{
|
||
"uid": "network-traffic",
|
||
"title": "Network / Traffic",
|
||
"tags": ["network", "infra"],
|
||
"timezone": "browser",
|
||
"schemaVersion": 39,
|
||
"version": 1,
|
||
"refresh": "30s",
|
||
"time": { "from": "now-3h", "to": "now" },
|
||
"templating": {
|
||
"list": [
|
||
{
|
||
"name": "instance", "type": "query",
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"query": { "query": "label_values(node_network_receive_bytes_total, instance)", "refId": "v" },
|
||
"refresh": 2, "includeAll": false, "current": { "text": "fr1", "value": "fr1" }
|
||
},
|
||
{
|
||
"name": "device", "type": "query",
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"query": { "query": "label_values(node_network_receive_bytes_total{instance=~\"$instance\",device!~\"lo|veth.*|br-.*|docker.*\"}, device)", "refId": "v" },
|
||
"refresh": 2, "includeAll": true, "multi": true, "current": { "text": "All", "value": "$__all" }
|
||
}
|
||
]
|
||
},
|
||
"panels": [
|
||
{
|
||
"type": "timeseries", "title": "Входящий трафик (RX)", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "bps", "custom": { "drawStyle": "line", "lineWidth": 2, "fillOpacity": 10 } } },
|
||
"targets": [ { "expr": "rate(node_network_receive_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])*8", "legendFormat": "{{device}}", "refId": "A" } ]
|
||
},
|
||
{
|
||
"type": "timeseries", "title": "Исходящий трафик (TX)", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "bps", "custom": { "drawStyle": "line", "lineWidth": 2, "fillOpacity": 10 } } },
|
||
"targets": [ { "expr": "rate(node_network_transmit_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])*8", "legendFormat": "{{device}}", "refId": "A" } ]
|
||
},
|
||
{
|
||
"type": "stat", "title": "RX суммарно (сейчас)", "gridPos": { "h": 6, "w": 6, "x": 0, "y": 8 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "bps", "color": { "mode": "thresholds" }, "thresholds": { "steps": [ { "color": "green", "value": null } ] } } },
|
||
"targets": [ { "expr": "sum(rate(node_network_receive_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])*8)", "refId": "A" } ]
|
||
},
|
||
{
|
||
"type": "stat", "title": "TX суммарно (сейчас)", "gridPos": { "h": 6, "w": 6, "x": 6, "y": 8 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "bps", "color": { "mode": "thresholds" }, "thresholds": { "steps": [ { "color": "blue", "value": null } ] } } },
|
||
"targets": [ { "expr": "sum(rate(node_network_transmit_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])*8)", "refId": "A" } ]
|
||
},
|
||
{
|
||
"type": "timeseries", "title": "Пакеты/с (RX +, TX −)", "gridPos": { "h": 6, "w": 12, "x": 12, "y": 8 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "pps", "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 5 } } },
|
||
"targets": [
|
||
{ "expr": "rate(node_network_receive_packets_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])", "legendFormat": "rx {{device}}", "refId": "A" },
|
||
{ "expr": "-rate(node_network_transmit_packets_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])", "legendFormat": "tx {{device}}", "refId": "B" }
|
||
]
|
||
},
|
||
{
|
||
"type": "timeseries", "title": "Ошибки и дропы /с", "gridPos": { "h": 7, "w": 12, "x": 0, "y": 14 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "pps", "custom": { "drawStyle": "line", "lineWidth": 2, "fillOpacity": 10 } } },
|
||
"targets": [
|
||
{ "expr": "rate(node_network_receive_errs_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])", "legendFormat": "rx errs {{device}}", "refId": "A" },
|
||
{ "expr": "rate(node_network_transmit_errs_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])", "legendFormat": "tx errs {{device}}", "refId": "B" },
|
||
{ "expr": "rate(node_network_receive_drop_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])", "legendFormat": "rx drop {{device}}", "refId": "C" },
|
||
{ "expr": "rate(node_network_transmit_drop_total{instance=~\"$instance\",device=~\"$device\"}[$__rate_interval])", "legendFormat": "tx drop {{device}}", "refId": "D" }
|
||
]
|
||
},
|
||
{
|
||
"type": "timeseries", "title": "Статус интерфейсов (up=1)", "gridPos": { "h": 7, "w": 12, "x": 12, "y": 14 },
|
||
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
||
"fieldConfig": { "defaults": { "unit": "short", "max": 1, "min": 0, "custom": { "drawStyle": "line", "lineWidth": 2, "fillOpacity": 0 } } },
|
||
"targets": [ { "expr": "node_network_up{instance=~\"$instance\",device=~\"$device\"}", "legendFormat": "{{device}}", "refId": "A" } ]
|
||
}
|
||
]
|
||
}
|