Revert "monitoring(network): organize Traefik traffic lanes"
This reverts commit eeec8b72dc885950dd116d6dc2ad6574c1cbe6b1.
This commit is contained in:
parent
eeec8b72dc
commit
9b8a29022d
@ -3786,34 +3786,28 @@ def build_network_dashboard():
|
||||
transformations=[{"id": "labelsToFields", "options": {}}],
|
||||
)
|
||||
)
|
||||
traffic_thresholds = {
|
||||
"mode": "absolute",
|
||||
"steps": [{"color": "blue", "value": None}],
|
||||
}
|
||||
panels.append(
|
||||
bargauge_panel(
|
||||
timeseries_panel(
|
||||
11,
|
||||
"Traefik Routers (req/s)",
|
||||
f"topk(10, {TRAEFIK_ROUTER_EXPR})",
|
||||
{"h": 9, "w": 12, "x": 0, "y": 25},
|
||||
unit="req/s",
|
||||
legend="{{router}}",
|
||||
instant=True,
|
||||
thresholds=traffic_thresholds,
|
||||
description="Current five-minute request rate, with one vertically aligned lane per router.",
|
||||
legend_display="table",
|
||||
legend_placement="right",
|
||||
)
|
||||
)
|
||||
panels.append(
|
||||
bargauge_panel(
|
||||
timeseries_panel(
|
||||
12,
|
||||
"Traefik Entrypoints (req/s)",
|
||||
'sum by (entrypoint) (rate(traefik_entrypoint_requests_total[5m]))',
|
||||
{"h": 9, "w": 12, "x": 12, "y": 25},
|
||||
unit="req/s",
|
||||
legend="{{entrypoint}}",
|
||||
instant=True,
|
||||
thresholds=traffic_thresholds,
|
||||
description="Current five-minute request rate, with one vertically aligned lane per entrypoint.",
|
||||
legend_display="table",
|
||||
legend_placement="right",
|
||||
)
|
||||
)
|
||||
return {
|
||||
|
||||
@ -52,23 +52,6 @@ def test_node_filter_and_expr_helpers():
|
||||
assert "node_memory_MemAvailable_bytes" in mem_expr
|
||||
|
||||
|
||||
def test_network_routes_render_as_vertical_lanes():
|
||||
mod = load_module()
|
||||
dashboard = mod.build_network_dashboard()
|
||||
panels_by_title = {panel["title"]: panel for panel in dashboard["panels"]}
|
||||
|
||||
for title, label in (
|
||||
("Traefik Routers (req/s)", "{{router}}"),
|
||||
("Traefik Entrypoints (req/s)", "{{entrypoint}}"),
|
||||
):
|
||||
panel = panels_by_title[title]
|
||||
assert panel["type"] == "bargauge"
|
||||
assert panel["options"]["orientation"] == "horizontal"
|
||||
assert panel["targets"][0]["instant"] is True
|
||||
assert panel["targets"][0]["legendFormat"] == label
|
||||
assert "one vertically aligned lane" in panel["description"]
|
||||
|
||||
|
||||
def test_overview_availability_panel_uses_recorded_365d_rollup():
|
||||
mod = load_module()
|
||||
dashboard = mod.build_overview()
|
||||
|
||||
@ -579,7 +579,7 @@
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": "bargauge",
|
||||
"type": "timeseries",
|
||||
"title": "Traefik Routers (req/s)",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@ -593,59 +593,30 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sort_desc(topk(10, sum by (router) (rate(traefik_router_requests_total[5m]))))",
|
||||
"expr": "topk(10, sum by (router) (rate(traefik_router_requests_total[5m])))",
|
||||
"refId": "A",
|
||||
"legendFormat": "{{router}}",
|
||||
"instant": true
|
||||
"legendFormat": "{{router}}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"unit": "req/s",
|
||||
"min": 0,
|
||||
"max": null,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "dark-blue",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
"unit": "req/s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "right"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi"
|
||||
}
|
||||
},
|
||||
"description": "Current five-minute request rate, with one vertically aligned lane per router.",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "sortBy",
|
||||
"options": {
|
||||
"fields": [
|
||||
"Value"
|
||||
],
|
||||
"order": "desc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": "bargauge",
|
||||
"type": "timeseries",
|
||||
"title": "Traefik Entrypoints (req/s)",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@ -659,55 +630,26 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sort_desc(sum by (entrypoint) (rate(traefik_entrypoint_requests_total[5m])))",
|
||||
"expr": "sum by (entrypoint) (rate(traefik_entrypoint_requests_total[5m]))",
|
||||
"refId": "A",
|
||||
"legendFormat": "{{entrypoint}}",
|
||||
"instant": true
|
||||
"legendFormat": "{{entrypoint}}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"unit": "req/s",
|
||||
"min": 0,
|
||||
"max": null,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "dark-blue",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
"unit": "req/s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "right"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi"
|
||||
}
|
||||
},
|
||||
"description": "Current five-minute request rate, with one vertically aligned lane per entrypoint.",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "sortBy",
|
||||
"options": {
|
||||
"fields": [
|
||||
"Value"
|
||||
],
|
||||
"order": "desc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": {
|
||||
|
||||
@ -588,7 +588,7 @@ data:
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": "bargauge",
|
||||
"type": "timeseries",
|
||||
"title": "Traefik Routers (req/s)",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@ -602,59 +602,30 @@ data:
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sort_desc(topk(10, sum by (router) (rate(traefik_router_requests_total[5m]))))",
|
||||
"expr": "topk(10, sum by (router) (rate(traefik_router_requests_total[5m])))",
|
||||
"refId": "A",
|
||||
"legendFormat": "{{router}}",
|
||||
"instant": true
|
||||
"legendFormat": "{{router}}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"unit": "req/s",
|
||||
"min": 0,
|
||||
"max": null,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "dark-blue",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
"unit": "req/s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "right"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi"
|
||||
}
|
||||
},
|
||||
"description": "Current five-minute request rate, with one vertically aligned lane per router.",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "sortBy",
|
||||
"options": {
|
||||
"fields": [
|
||||
"Value"
|
||||
],
|
||||
"order": "desc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": "bargauge",
|
||||
"type": "timeseries",
|
||||
"title": "Traefik Entrypoints (req/s)",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@ -668,55 +639,26 @@ data:
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sort_desc(sum by (entrypoint) (rate(traefik_entrypoint_requests_total[5m])))",
|
||||
"expr": "sum by (entrypoint) (rate(traefik_entrypoint_requests_total[5m]))",
|
||||
"refId": "A",
|
||||
"legendFormat": "{{entrypoint}}",
|
||||
"instant": true
|
||||
"legendFormat": "{{entrypoint}}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"unit": "req/s",
|
||||
"min": 0,
|
||||
"max": null,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "dark-blue",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
"unit": "req/s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "right"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi"
|
||||
}
|
||||
},
|
||||
"description": "Current five-minute request rate, with one vertically aligned lane per entrypoint.",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "sortBy",
|
||||
"options": {
|
||||
"fields": [
|
||||
"Value"
|
||||
],
|
||||
"order": "desc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"time": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user