Files
infra/stacks/monitoring/grafana/provisioning/dashboards/network.json

95 lines
6.2 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"uid": "network-traffic",
"title": "Network / Traffic",
"tags": ["network", "infra"],
"timezone": "browser",
"schemaVersion": 39,
"version": 2,
"refresh": "30s",
"time": { "from": "now-24h", "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": "row", "title": "Объём за выбранный период (диапазон вверху справа)", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }
},
{
"type": "stat", "title": "Принято всего (RX)", "gridPos": { "h": 5, "w": 6, "x": 0, "y": 1 },
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "bytes", "color": { "mode": "fixed", "fixedColor": "green" } } },
"options": { "colorMode": "value", "graphMode": "area" },
"targets": [ { "expr": "sum(increase(node_network_receive_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__range]))", "refId": "A" } ]
},
{
"type": "stat", "title": "Отдано всего (TX)", "gridPos": { "h": 5, "w": 6, "x": 6, "y": 1 },
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "bytes", "color": { "mode": "fixed", "fixedColor": "blue" } } },
"options": { "colorMode": "value", "graphMode": "area" },
"targets": [ { "expr": "sum(increase(node_network_transmit_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__range]))", "refId": "A" } ]
},
{
"type": "bargauge", "title": "Объём по интерфейсам (RX за период)", "gridPos": { "h": 5, "w": 6, "x": 12, "y": 1 },
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "bytes" } },
"options": { "displayMode": "gradient", "orientation": "horizontal" },
"targets": [ { "expr": "increase(node_network_receive_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__range])", "legendFormat": "{{device}}", "refId": "A", "instant": true } ]
},
{
"type": "bargauge", "title": "Объём по интерфейсам (TX за период)", "gridPos": { "h": 5, "w": 6, "x": 18, "y": 1 },
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "bytes" } },
"options": { "displayMode": "gradient", "orientation": "horizontal" },
"targets": [ { "expr": "increase(node_network_transmit_bytes_total{instance=~\"$instance\",device=~\"$device\"}[$__range])", "legendFormat": "{{device}}", "refId": "A", "instant": true } ]
},
{
"type": "row", "title": "Скорость (мгновенная)", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 6 }
},
{
"type": "timeseries", "title": "Скорость входящего (RX), бит/с", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 7 },
"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": 7 },
"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": "timeseries", "title": "Пакеты/с (RX +, TX )", "gridPos": { "h": 6, "w": 12, "x": 0, "y": 15 },
"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": 6, "w": 12, "x": 12, "y": 15 },
"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" }
]
}
]
}