Skip to content

Commit 05da85d

Browse files
committed
obs(grafana): PR787 r1 — coderabbit critical (ID collision) + Major (missing node_id filter)
Two findings on PR #787 Lua VM Pool dashboard panels: ## coderabbit Critical (line 1749) The new "Lua VM Pool" row used `"id": 24`, which collided with an existing panel in the "Hot Path (legacy PR #560)" row (line 1234) that already had `"id": 24`. Grafana requires unique IDs across all rows and panels within a dashboard; the collision would cause dashboard import failures or unexpected UI behaviour on render. Fix: changed the new row's id from `24` to `33`. The existing dashboard ID space went up through `32` on the last panel of the previous row, so `33` is the next free slot and respects the existing numbering convention. ## coderabbit Major (line 1817) The new Lua VM Pool queries hardcoded `job="elastickv"` without the `node_id=~"$node_id"` template-variable filter that every other row in this dashboard uses. Operators selecting a specific node in the $node_id dropdown expect all panels to filter — without the filter, the Lua VM Pool row would always show metrics for every node regardless of the selection, preventing per-node drilldown when troubleshooting pool sizing. Fix: added `node_id=~"$node_id"` to all seven query expressions in the row: - line 1817 — `elastickv_lua_pool_idle` (Idle vs cap) - line 1825 — `elastickv_lua_pool_max_idle` (Idle vs cap) - line 1890 — `sum by (node_id) (rate(elastickv_lua_pool_hits_total ...))` - line 1898 — `sum by (node_id) (rate(elastickv_lua_pool_misses_total ...))` - line 1906 — `sum by (node_id) (rate(elastickv_lua_pool_drops_total ...))` - line 1970 — `sum by (node_id) (increase(... pool_drops ...))` - line 2036 — saturation ratio (idle / max_idle) The filter pattern (`job="elastickv",node_id=~"$node_id"`) matches the existing Hot Path row's queries exactly. Verified: - `jq -e . monitoring/grafana/dashboards/elastickv-redis-summary.json` → valid JSON - `grep elastickv_lua_pool ... | grep -v node_id` returns only the description string (no remaining queries without the filter) JSON-only change. No Go code touched; no caller audit needed. Remaining gemini medium (line 86 collector-registration noisy logs) is below the loop's P0/P1/high/critical/major threshold and is deferred.
1 parent f7354b4 commit 05da85d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

monitoring/grafana/dashboards/elastickv-redis-summary.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@
17461746
"x": 0,
17471747
"y": 71
17481748
},
1749-
"id": 24,
1749+
"id": 33,
17501750
"panels": [
17511751
{
17521752
"datasource": "$datasource",
@@ -1814,15 +1814,15 @@
18141814
{
18151815
"datasource": "$datasource",
18161816
"editorMode": "code",
1817-
"expr": "elastickv_lua_pool_idle{job=\"elastickv\"}",
1817+
"expr": "elastickv_lua_pool_idle{job=\"elastickv\",node_id=~\"$node_id\"}",
18181818
"legendFormat": "idle {{node_id}}",
18191819
"range": true,
18201820
"refId": "A"
18211821
},
18221822
{
18231823
"datasource": "$datasource",
18241824
"editorMode": "code",
1825-
"expr": "elastickv_lua_pool_max_idle{job=\"elastickv\"}",
1825+
"expr": "elastickv_lua_pool_max_idle{job=\"elastickv\",node_id=~\"$node_id\"}",
18261826
"legendFormat": "max_idle {{node_id}}",
18271827
"range": true,
18281828
"refId": "B"
@@ -1887,23 +1887,23 @@
18871887
{
18881888
"datasource": "$datasource",
18891889
"editorMode": "code",
1890-
"expr": "sum by (node_id) (rate(elastickv_lua_pool_hits_total{job=\"elastickv\"}[5m]))",
1890+
"expr": "sum by (node_id) (rate(elastickv_lua_pool_hits_total{job=\"elastickv\",node_id=~\"$node_id\"}[5m]))",
18911891
"legendFormat": "hits {{node_id}}",
18921892
"range": true,
18931893
"refId": "A"
18941894
},
18951895
{
18961896
"datasource": "$datasource",
18971897
"editorMode": "code",
1898-
"expr": "sum by (node_id) (rate(elastickv_lua_pool_misses_total{job=\"elastickv\"}[5m]))",
1898+
"expr": "sum by (node_id) (rate(elastickv_lua_pool_misses_total{job=\"elastickv\",node_id=~\"$node_id\"}[5m]))",
18991899
"legendFormat": "misses {{node_id}}",
19001900
"range": true,
19011901
"refId": "B"
19021902
},
19031903
{
19041904
"datasource": "$datasource",
19051905
"editorMode": "code",
1906-
"expr": "sum by (node_id) (rate(elastickv_lua_pool_drops_total{job=\"elastickv\"}[5m]))",
1906+
"expr": "sum by (node_id) (rate(elastickv_lua_pool_drops_total{job=\"elastickv\",node_id=~\"$node_id\"}[5m]))",
19071907
"legendFormat": "drops {{node_id}}",
19081908
"range": true,
19091909
"refId": "C"
@@ -1967,7 +1967,7 @@
19671967
{
19681968
"datasource": "$datasource",
19691969
"editorMode": "code",
1970-
"expr": "sum by (node_id) (increase(elastickv_lua_pool_drops_total{job=\"elastickv\"}[$__range]))",
1970+
"expr": "sum by (node_id) (increase(elastickv_lua_pool_drops_total{job=\"elastickv\",node_id=~\"$node_id\"}[$__range]))",
19711971
"legendFormat": "{{node_id}}",
19721972
"range": true,
19731973
"refId": "A"
@@ -2033,7 +2033,7 @@
20332033
{
20342034
"datasource": "$datasource",
20352035
"editorMode": "code",
2036-
"expr": "elastickv_lua_pool_idle{job=\"elastickv\"} / elastickv_lua_pool_max_idle{job=\"elastickv\"}",
2036+
"expr": "elastickv_lua_pool_idle{job=\"elastickv\",node_id=~\"$node_id\"} / elastickv_lua_pool_max_idle{job=\"elastickv\",node_id=~\"$node_id\"}",
20372037
"legendFormat": "{{node_id}}",
20382038
"range": true,
20392039
"refId": "A"

0 commit comments

Comments
 (0)