0

Is there any way to create some "info box" which doesn't relate to numbers?

For example, querying the following:

container_cpu_usage_seconds_total{namespace="test4", pod=~"api.*", container!=""}

will return this result:

container_cpu_usage_seconds_total{container="api", image="myacr.azurecr.io/api:3.3.0", pod="api-f6b7657c7-f65nz", namespace="test4"}

From this, I want to extract the image name, and create a text of:

api image: myacr.azurecr.io/api:3.3.0

I tried to use "text" as a graph, but a "text" doesn't have any query ability, only a a static markup

the reason I need it is to see all images by pod name of current choosen namespaces.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
toto
  • 1,197
  • 2
  • 15
  • 26

1 Answers1

0

I have found out that using graph of type "Text" in grafana, you can add inline access to variables. Steps:

  1. create a variable
  2. optional: set the variable "hide" mode to "variable" (unless u actually need it for your dashboard).
  3. create a graph of type "Text" and in the content use $my_variable_name to reference the variable!

Cheers, if it helped anyone.

toto
  • 1,197
  • 2
  • 15
  • 26