I'm working on Hawkular and Grafana integration for our OpenShift Container Platform project.
I succeeded in configuring Hawkular Datasource in a Grafana instance.
As Hawkular Metrics keeps data of multiple pods, it became a tough task to get the data for the latest pod which is currently up and running.
Let's say I want to get the memory usage of a latest pod which is active now. How can I do that? As there can be multiple pods in an OCP project, some pods could have been gone and not active now, I'm getting a list of random names for pods instances when querying metrics in Grafana dashboard like this {appname/somerandomstring/memory/usage}
.
I'm getting multiple such values. Is there any way to get the latest and active one from such a list?
How do I actually get the latest pod with a specific name in metrics name?