Showing one of several results

hello i have a question,
can you implement the following conditions?

  1. There are a total of 4 queries in one panel.

  2. Each query has different values.

  3. The values ​​are different, but each query result is one of the following sets: OK, Warning, or Critical, depending on the conditions.

  4. The panel should display OK if four queries are OK, warning if there is one warning, and critical if there is at least one critical.

  • When I checked the status panel, it seemed difficult to use because the values ​​were different for each query.

thx

so you want to show only one stat value?

yes, i want only one stat

Hi,

What datasource are you using? Can you provide a sample query with condition? What is the output of your queries.

Have you tried using Math expression to somehow decide on that using boolean logic?

Another approach would be using Max calculation of Stat panel - if you can transpose your conditions to numbers (like Normal = 0, Warning = 1, Critical = 2), you can pick max calculation from stat panel, and there you have your solution. On the screen I have four prometheus queries producing output like shown before and transformation reduce applied:

If on data like this I take stat visualization and apply max calculation, I’ll get value 1, which (with value mappings) could be transposed to Warning string.


this is using business text

does warning trump critical or the other way around