I’m very new to Graphana, and I’m trying to make a custom variable – $rds
– whose value depends on the values of other custom variables – $build
and $environment
– but in a somewhat complex way that I haven’t been able to figure out how to apply in Graphana.
When $environment == “test”
, I want $rds
to be “web-$environment”
, but when $environment == “prod”
, I want $rds
to be “$build-$environment”
. We only have one test database, but we have different prod DBs for our two different builds.
I’ve currently solved this by just setting $rds
as a custom variable with three values, web-test, sites-prod, divisions-prod
, but it would be much better if my users didn’t have to manually fiddle with $rds
, since its value always depends on the other variables (which they will be setting themselves).
I’m using a self-hosted version of Graphana v8.5.15 (be4228db5a).