Add logic to Grafana with promtheus data source

  • What Grafana version and what operating system are you using?
    7.5.2
  • What are you trying to achieve?
    Show databases based on ENV selection, like select PROD and it will show the prod databases that are in a custom variable, using prometheus as data source.
  • How are you trying to achieve it?
    Using custom variables to write down the database names.
  • What happened?
    Can’t find a way or lack the experience to do what I need.
  • What did you expect to happen?
    Still trying to figure out if my approach is correct or is there a better approach.
  • Can you copy/paste the configuration(s) that you are having problems with?
    N/A
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Nope
  • Did you follow any online instructions? If so, what is the URL?