Open rajendra-avesha opened 6 days ago
Please find the further analysis of this issue
I am able to find my custom metric available on the worker pod localhost:9080/metrics. (had verified running curl on the http://127.0.0.1:9080/metrics)
I tried to explore on the services created by rayservice
kubectl get svc -n customer1 -owide NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR rayservice-customer1-head-svc ClusterIP 10.0.253.179 <none> 10001/TCP,8265/TCP,6379/TCP,9080/TCP,8000/TCP 8m33s app.kubernetes.io/created-by=kuberay-operator,app.kubernetes.io/name=kuberay,ray.io/cluster=rayservice-customer1-raycluster-mj72p,ray.io/identifier=rayservice-customer1-raycluster-mj72p-head,ray.io/node-type=head rayservice-customer1-raycluster-mj72p-head-svc ClusterIP 10.0.234.131 <none> 10001/TCP,8265/TCP,6379/TCP,9080/TCP,8000/TCP 9m13s app.kubernetes.io/created-by=kuberay-operator,app.kubernetes.io/name=kuberay,ray.io/cluster=rayservice-customer1-raycluster-mj72p,ray.io/identifier=rayservice-customer1-raycluster-mj72p-head,ray.io/node-type=head rayservice-customer1-serve-svc ClusterIP 10.0.17.9 <none> 8000/TCP 8m33s ray.io/cluster=rayservice-customer1-raycluster-mj72p,ray.io/serve=true
When I tried to verify on the service rayservice-customer1-raycluster-mj72p-head-svc on port 9080 I couldn't find the metric. I tried on the other service too.
Is this both service tied to head as it has selector ray.io/node-type=head
Is my rayservice configuration is correct can you please review
Hi @rajendra-avesha, this thread https://ray.slack.com/archives/CNCKBBRJL/p1730741501573559 might be useful. If you still have the issue, feel free to reach out to us on the KubeRay Slack or reply to this issue.
Search before asking
KubeRay Component
ray-operator
What happened + What you expected to happen
I need to expose application level metrics on ray serve application; which shall be consumed by Prometheus I tried to use the Gauge from ray.serve.metrics module. Please find the reference code as follows
which is sample code provided by ray documentation When this code is run locally using serve run as follows
The custom metric ray_memory_usage_bytes is available at http://127.0.0.1:8080/ please refer to serverun.txt But the same source file when containerised and deployed using RayService.yaml as follows:
serverun.txt
Reproduction script
And created custom resource at rayservicedesc.txt
Port forwarding 9080 port of rayservice-customer1-head-svc service in customer1 namepace the custom metric is not available but ray and system metrics are available please find attached rayservice.txt Rayservice.txt
I am not sure what is missing here. Intially I tried with default 8080 port latter changed to 9080 port check if metrics-export-port is functional Please provide your inputs to debug further
Anything else
I tried multiple times
Are you willing to submit a PR?