Combine 4 metrics into 1 graph

  • What Grafana version and what operating system are you using?
  • What are you trying to achieve?
    I want to have 1 overview for 4 metrics
    So i have 4 metrics success, failed, running, queued and they can be 1.
    So if success is 1 then the rest is 0
    If failed is 1 then the others are 0

I would like to create a stat overview with 1 stat representing one of the 4 metrics.

  • How are you trying to achieve it?
    I dont know that yet.
    I can do a promql giving me all the metrics == 1
    And then the status field can maybe be used to differentiate the stat
    For example
  • What happened?
    I can not get it in stat as i want.
    When the status is succes i want stat to turn green.
    When it is failed i want it red.

  • What did you expect to happen?
    See above

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

I kinda made a workaround on it.
All metrics have either value 0 or 1 depending on the state.
By adding for example 24, 49, 99 i can differentiate the states.

For example:

If succes then this is 100
Then i use threshold an vlue mapping to make the dashboard with the Stat panel