cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get different metrics in a different row while creating a dashboard using DQL

susmita_k
Guide

So I have multiple metrics from SQL data source extn and I need to put them in rows and show the value. I am doing it like below.

But this is pulling data in one single row, instead of two rows. Can you please suggest how to get the intended result. any suggestion is appreciated. Thank you.


timeseries { db_invalid_object = avg(db_invalid_object)} , by: {device}, filter: { device == "a" }
|fieldsAdd HealthType ="DB Invalid Object"
|fieldsAdd db_invalid_object_count = arrayAvg(db_invalid_object)
|fieldsadd current_status = if(db_invalid_object_count==0.00, "HEALTHY", else: "UNHEALTHY")
|fieldsAdd db_node= device
|fields HealthType,db_node, current_status,db_invalid_object_count
|join [timeseries { db_invalid_index = avg(db_invalid_index)} , by: {device}, filter: { device == "a" }
|fieldsAdd HealthType ="DB Invalid Index"
|fieldsAdd db_invalid_index_count = arrayAvg(db_invalid_index)
|fieldsadd current_status = if(db_invalid_index_count==0.00, "HEALTHY", else: "UNHEALTHY")
|fieldsAdd db_node= device
|fields HealthType,db_node, current_status,db_invalid_index_count]
,on:{db_node}

2 REPLIES 2

krzysztof_hoja
Dynatrace Champion
Dynatrace Champion

Please use append command:

timeseries { db_invalid_object = avg(db_invalid_object)} , by: {device}, filter: { device == "a" }
| fieldsAdd HealthType ="DB Invalid Object"
| fieldsAdd db_invalid_object_count = arrayAvg(db_invalid_object)
| fieldsadd current_status = if(db_invalid_object_count==0.00, "HEALTHY", else: "UNHEALTHY")
| fieldsAdd db_node= device
| fields HealthType,db_node, current_status,db_invalid_object_count
| append [
    timeseries { db_invalid_index = avg(db_invalid_index)} , by: {device}, filter: { device == "a" }
    | fieldsAdd HealthType ="DB Invalid Index"
    | fieldsAdd db_invalid_index_count = arrayAvg(db_invalid_index)
    | fieldsadd current_status = if(db_invalid_index_count==0.00, "HEALTHY", else: "UNHEALTHY")
    | fieldsAdd db_node= device
    | fields HealthType,db_node, current_status,db_invalid_index_count
]

 

Kris

Thanks @krzysztof_hoja . It worked as expected. Is there anyway to import the DQL dashboard to Dashboard classic page ?

Featured Posts