Global variable in dasboard

Hi!

Is it possible to create a numeric global variable to set dashboard thresholds?

E.g.
image

  • Alex

Welcome to the :grafana: community @machneit

Defining variables seems to only be available at dashboard level at the moment. See post bellow with a workaround for that. Hope it helps!

Docs for creating dashboard variables here.

Actually, what I need is to be able to use a dashboard variable in any panel field. For now, it only works with the title field (e.g., In /Settings/Variables I have defined a variable named HOST, and I name my title field: “My host is $HOST”). This would enable me to change the threshold of all my dashboard panels at once.

:wave: Hi can you please help me.

in any panel field in the dashboard where the variable is created or in any panels outside of the dashboard variable is created in?

Actually, what I need is to be able to use a dashboard variable in any panel field. For now, it only works with the title field (e.g., In /Settings/Variables I have defined a variable named HOST, and I name my title field: “My host is $HOST”). This would enable me to change the threshold of all my dashboard panels at once.

you just copy pasted your last post.

do you want to use this variable in any panel field in the dashboard where the variable is created or in any panels outside of the dashboard variable is created in?

Sorry. I want to use this variable in any panel field in the dashboard where the variable is created.

How is this not a feature yet? I want to simply use a variable that I set globally to display as part of my alert messaging:

So a templated message like:
Environment: ${ENV} should become “Environment: dev”