Time series Panels that modify other panels selection

Hi everyone!

I have a Grafana Dashboard with a Prometheus source. This dashboard provides info about Pods in a Kubernetes Cluster.

Usually the panels that I use are time series panel, showing also a legend with the name of the pod.

I would need to select a Pod in one of the panels, and the other panels should be filtered by that selection.

Example: I select one Pod in “Pods in trouble” time series panel, and other panels like “CPU monitoring Pods”, “Memory monitoring Pods” (which are also time series Panels), should show only the pod I have selected.

Is there any way to apply that? If the solution does not make to create a new dashboard and link to that dashboard, even better!!

You could try creating a variable with pod name in it, limiting your queries with that variable, e.g.:

sum(rate(cpu_usage_seconds_total{pod=~“$pod”}[5m]))`

and creating a data link for the pod selection (considering your pod name is stored in pod label:

Where 20e...fd is the dashboard uid of the same dashboard (you basically create a link to the same dashboard).

Then, after you click on a data point on the graph, there will be a button on a tooltip (security reasons I won’t show the whole tooltip):
image

It won’t work with clicking on the legend though.

1 Like