Repository navigation
[Grafana] add Cluster variable to enable filtering of different RayClusters on Kubernetes - #49498
Merged
Merged
Conversation
Member
Author
|
@kevin85421 PTAL when you are free. |
…t RayClusters Signed-off-by: win5923 <[email protected]>
win5923
force-pushed
the
ray_io_cluster/filter
branch
from
December 30, 2024 16:10
a94f86c to
c7065ca
Compare
win5923
marked this pull request as draft
December 31, 2024 00:57
win5923
marked this pull request as ready for review
December 31, 2024 00:57
Member
|
also cc @MengjinYan @alanwguo who own observability / dashboard |
MengjinYan
reviewed
Dec 31, 2024
MengjinYan
left a comment
Contributor
There was a problem hiding this comment.
Only minor comments on the python files.
We also need further review from the observability team on the dashboard json files.
alanwguo
reviewed
Jan 3, 2025
win5923
force-pushed
the
ray_io_cluster/filter
branch
3 times, most recently
from
January 4, 2025 04:14
c76065e to
b4e89a6
Compare
Signed-off-by: win5923 <[email protected]>
win5923
force-pushed
the
ray_io_cluster/filter
branch
from
January 4, 2025 04:22
b4e89a6 to
894dff2
Compare
ray_io_cluster varaible to enable filtering of different RayClusters on KubernetesRayClusterName varaible to enable filtering of different RayClusters on Kubernetes
MengjinYan
approved these changes
Jan 5, 2025
MengjinYan
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Probably need Alan's shipit as well.
alanwguo
reviewed
Jan 6, 2025
alanwguo
reviewed
Jan 7, 2025
win5923
force-pushed
the
ray_io_cluster/filter
branch
2 times, most recently
from
January 7, 2025 13:00
38c6ce8 to
eb47376
Compare
alanwguo
approved these changes
Jan 7, 2025
alanwguo
left a comment
Contributor
There was a problem hiding this comment.
please rename Cluster_Name to Cluster
win5923
force-pushed
the
ray_io_cluster/filter
branch
from
January 8, 2025 01:30
eb47376 to
786546d
Compare
Signed-off-by: win5923 <[email protected]>
win5923
force-pushed
the
ray_io_cluster/filter
branch
from
January 8, 2025 01:32
786546d to
4181daf
Compare
RayClusterName varaible to enable filtering of different RayClusters on KubernetesCluster varaible to enable filtering of different RayClusters on Kubernetes
Cluster varaible to enable filtering of different RayClusters on KubernetesCluster variable to enable filtering of different RayClusters on Kubernetes
Member
Author
2 of 4 tasks
kevin85421
approved these changes
Jan 9, 2025
roshankathawate
pushed a commit
to roshankathawate/ray
that referenced
this pull request
Jan 9, 2025
…Clusters on Kubernetes (ray-project#49498) Signed-off-by: win5923 <[email protected]> Signed-off-by: Roshan Kathawate <[email protected]>
HYLcool
pushed a commit
to HYLcool/ray
that referenced
this pull request
Jan 13, 2025
…Clusters on Kubernetes (ray-project#49498) Signed-off-by: win5923 <[email protected]> Signed-off-by: lielin.hyl <[email protected]>
1 of 2 tasks
srinathk10
pushed a commit
that referenced
this pull request
Feb 2, 2025
…Clusters on Kubernetes (#49498) Signed-off-by: win5923 <[email protected]>
8 tasks
park12sj
pushed a commit
to park12sj/ray
that referenced
this pull request
Mar 18, 2025
…Clusters on Kubernetes (ray-project#49498) Signed-off-by: win5923 <[email protected]>
5 of 8 tasks
eicherseiji
pushed a commit
that referenced
this pull request
Jul 9, 2026
## 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 #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 #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]>
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?
Addresses kuberay-project/kuberay#2502
Currently, the
ray_io_clusterlabel is only available when using K8s with PodMonitor, but this does not affect users who only use Ray. Below are the results.ray data dashboard from

/tmp/ray/session_latest/metrics/grafana/dashboardsray core dashboard from

/tmp/ray/session_latest/metrics/grafana/dashboardsRelated issue number
Closes kuberay-project/kuberay#2502
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.