robusta-dev / krr

Prometheus-based Kubernetes Resource Recommendations
MIT License
3.06k stars 162 forks source link

Is there a way to support Java and JVM metrics? #367

Open ErezWeiss opened 5 days ago

ErezWeiss commented 5 days ago

Is there a way to support Java and JVM metrics?

So we can see inside the JVM and get recommendations from inside, as it is shown outside the JVM as fully used. Thanks!

arikalon1 commented 1 day ago

Hey @ErezWeiss

Can you explain what are you trying to achieve? You'd like to see cpu and memory usage of the java process over time? How are you going to use that information?

ErezWeiss commented 1 day ago

Hi @arikalon1 KRR's memory suggestions rely on the general consumption of the container, but Java always allocates it all. The real info is inside the JVM, and I want to get suggestions based on it.

arikalon1 commented 23 hours ago

Thanks for the explanation @ErezWeiss,

KRR supports recommendation strategies. In order to support the above, we need to build a new recommendation strategy, JVMStrategy, and assuming the jvm metrics are in Prometheus, it shouldn't be hard to implement.

I don't think we have availability to implement it right now, but if you're interested in contributing a PR for it, it would be amazing