Metro
Metro

Reputation: 975

How to show dynamic information in Grafana panels

I'm configuring panels in Grafana, but the display shows a little more information than I would like.

enter image description here

Ideally, I only want to see the IP address and the value, like this, without the instance ID.

enter image description here

At the moment, I'm only able to do this using overrides and manually hardcoding the value I want to see, in this case, the private IP address.

Is there a way to have this dynamically generated, sort of how you would use variables in the Dimensions, so that each panel shows the value and private IP address of the instance being visualised, so that I don;t have to manually update this across so many instances.

I'm using Grafana 9.0.x

I'd have thought this would be possible using Legends, but I can't seem to find the Lengend in this new version of Grafana.

I can see the option to add a Label, but I don't see any way to create one using the privateIP variable I've created.

Upvotes: 1

Views: 667

Answers (1)

dnnshssm
dnnshssm

Reputation: 1305

You can use Rename by regex from the Transformations for that.

Go to the tab Transform, select Rename by regex, enter a regex that matches all IP addresses in the Match field and replace the initial name with the match. An example can be found in the docs.

Upvotes: 1

Related Questions