Repository navigation
[serve][llm] Add Cluster filter to Serve LLM Grafana dashboard - #64596
Merged
eicherseiji merged 2 commits intoJul 9, 2026
Merged
eicherseiji merged 2 commits into
eicherseiji merged 2 commits into
Conversation
kevin85421
force-pushed
the
serve-llm-dashboard-cluster-filter
branch
from
July 8, 2026 07:51
bfd9572 to
92994ab
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds cluster-level filtering to the Serve LLM Grafana dashboard by introducing a 'Cluster' template variable and updating the standard global filters. It also adds corresponding unit tests to verify that the dashboard utilizes these filters correctly. The review feedback suggests correcting a typo ('automaticaly' to 'automatically') in the variable's description and setting the 'label' field to 'Cluster' instead of null for consistency with other template variables.
kevin85421
force-pushed
the
serve-llm-dashboard-cluster-filter
branch
2 times, most recently
from
July 9, 2026 05:28
ea2d2de to
b435295
Compare
The Serve LLM dashboard could not be filtered by cluster: it had an empty
`standard_global_filters` and its base JSON defined no `Cluster` template
variable, unlike the default/serve/data dashboards. As a result every panel
query ignored `ray_io_cluster`.
Enable the cluster filter by setting `standard_global_filters` to
`ray_io_cluster=~"$Cluster"` (injected into the existing `{global_filters}`
slots) and add the `Cluster` template variable to the base JSON, mirroring the
Serve dashboard.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Kai-Hsun Chen <[email protected]>
kevin85421
force-pushed
the
serve-llm-dashboard-cluster-filter
branch
from
July 9, 2026 07:16
b435295 to
06bf1f6
Compare
kevin85421
marked this pull request as ready for review
July 9, 2026 07:29
jeffreywang88
added a commit
that referenced
this pull request
Jul 16, 2026
Mirrors the vLLM Serve LLM dashboard (#64596): adds a Cluster template variable and sets standard_global_filters to ray_io_cluster=~"$Cluster", which fills the existing {global_filters} slots in the panel queries. Co-Authored-By: Dongjun Na <[email protected]> Signed-off-by: Jeffrey Wang <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…roject#64596) ## Why are these changes needed? Most Ray Grafana dashboards let users use `Cluster` to switch between different Ray clusters. For example, I set `Cluster` to `kaihsun-test` in the `Default Dashboard` to view the metrics related to my RayCluster. <img width="1109" height="450" alt="image" src="https://github.com/user-attachments/assets/0d46bd74-11a4-4c39-ab40-9302e109a130" /> However, the current `Serve LLM Dashboard` doesn't support `Cluster` as a variable. See the screenshot below for an example. Therefore, I can only see the serve deployment name, and I don't know which KubeRay RayService the deployment is from. <img width="1470" height="451" alt="image" src="https://github.com/user-attachments/assets/25c019e5-30b0-4942-902c-9eb3efe2abe2" /> This PR adds `Cluster` as a variable, and the change is similar to ray-project#49498. See the screenshot below for an example. <img width="1471" height="408" alt="Screenshot 2026-07-08 at 11 49 14 PM" src="https://github.com/user-attachments/assets/cbc154d8-0616-407f-a7d6-009016b7fb45" /> ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [x] I've signed off every commit (by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [x] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: Kai-Hsun Chen <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: 400Ping <[email protected]>
MengjinYan
pushed a commit
that referenced
this pull request
Nov 3, 2026
…na dashboard (#67470) ## Problem - The Data LLM panel queries have no `{global_filters}` placeholder, so no global filter ever reaches the panels. Filters set through `RAY_GRAFANA_DATA_LLM_DASHBOARD_GLOBAL_FILTERS` only reach the model and worker dropdowns. - The dashboard has no `SessionName` or `Cluster` dropdown, unlike the Data, Default and Serve dashboards. - So with Worker ID set to All, every panel mixes vLLM engines from every cluster that Prometheus scrapes. Choosing a cluster does not narrow the panels. ## Change - Add `{global_filters}` to every Data LLM panel selector (38 queries). - Set `standard_global_filters` to the Data dashboard's filters: `SessionName=~"$SessionName"` and `ray_io_cluster=~"$Cluster"`. - Add `SessionName` and `Cluster` dropdowns, and narrow the model and worker dropdowns to the selected session and cluster. ``` before after SessionName ─ (no dropdown) SessionName ─┬─> model & worker dropdowns Cluster ───── (no dropdown) Cluster ─────┤ and every panel selector override ───> model & worker override ────┘ dropdowns only ``` Repro, which prints how many panel queries carry each filter and the dropdown names: ```bash RAY_GRAFANA_DATA_LLM_DASHBOARD_GLOBAL_FILTERS='ClusterId=~"$ClusterId"' python -c ' import json from ray.dashboard.modules.metrics.grafana_dashboard_factory import generate_data_llm_grafana_dashboard d = json.loads(generate_data_llm_grafana_dashboard()[0]) exprs = [t["expr"] for p in d["panels"] for t in p.get("targets", [])] print(len(exprs), sum("ClusterId=~" in e for e in exprs), sum("ray_io_cluster=~" in e for e in exprs)) print([v["name"] for v in d["templating"]["list"]])' ``` | | Before | After | |---|---|---| | Panel queries carrying the override filter | 0 of 38 | 38 of 38 | | Engines in Cache Utilization for one cluster, Worker ID = All (one real job) | 13 (5 from other jobs) | 8 | ### Before / after Cache Utilization on a managed Grafana, with one job's cluster selected and Worker ID = All. Before, engines from another job appear from 14:16; after, only this job's 8 engines appear, from 14:37. **Before:** <img width="1525" height="784" alt="1-cache-utilization-before" src="https://github.com/user-attachments/assets/6dcb3e95-eb82-44ad-9b58-ecb2cf99d000" /> **After:** <img width="1478" height="812" alt="1-cache-utilization-after-session-cluster" src="https://github.com/user-attachments/assets/c9c58477-7793-4d48-a3c6-894b7bcdd1ca" /> ## Decisions to confirm - The `SessionName` dropdown lists sessions from a vLLM metric (`ray_vllm_request_prompt_tokens_sum`) instead of `ray_data_output_bytes`. It then shows only sessions that ran vLLM. - The `SessionName` "All" value is `.*` rather than the Data dashboard's `.+`, so series without the label still show. ## Related - Not a duplicate: no open issue or PR covers this. #64596 (Serve LLM) and #49498 applied the same `Cluster` filter pattern to other dashboards. - Tests: `pytest python/ray/tests/test_metrics_head.py`: 15 passed, with 9 new Data LLM cases. Run on a checkout that matches the latest nightly wheel; on current master, the 4 cluster-start tests need a nightly that includes #67258. - AI assistance: written with Claude Code. I reviewed every line. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Marwan Sarieddine <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Why are these changes needed?
Most Ray Grafana dashboards let users use
Clusterto switch between different Ray clusters. For example, I setClustertokaihsun-testin theDefault Dashboardto view the metrics related to my RayCluster.However, the current
Serve LLM Dashboarddoesn't supportClusteras a variable. See the screenshot below for an example. Therefore, I can only see the serve deployment name, and I don't know which KubeRay RayService the deployment is from.This PR adds
Clusteras a variable, and the change is similar to #49498. See the screenshot below for an example.Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.doc/source/tune/api/under the corresponding.rstfile.