DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dql query for summarize count ofthis endpoint

gasperetta
Frequent Guest

hi, i need the count of all value of this 3 endpoint.
How can i do this?

timeseries calls_per_min = sum(dt.service.request.count, rate:1m), by:{endpoint.name, dt.entity.service, dt.host_group.id}, interval: 1m
| fieldsAdd service_name = entityName(dt.entity.service)
| fieldsAdd endpoint_key = concat(service_name, " :: ", endpoint.name, " :: ", dt.host_group.id)
| filter in(endpoint_key,
"SportSaleController :: wagerService :: bet-booker",
"SportSaleController :: wagerService :: bpay",
"SportSaleController :: wagerService :: ssbt"

)

| fieldsAdd entityName(dt.entity.service)
| fieldsAdd lastvalue = arrayLast(calls_per_min)
| fieldsAdd string = " VENDITA "
//| fieldsAdd concat(string, endpoint.name, dt.entity.service.name, dt.host_group.id)
| fieldsAdd concat(string)

1 REPLY 1

t_pawlak
Leader

Hi,
try this:
Total number of calls over the selected time range (sum of all minutes)

timeseries calls_per_min = sum(dt.service.request.count, rate:1m),
  by:{endpoint.name, dt.entity.service, dt.host_group.id},
  interval: 1m
| fieldsAdd service_name = entityName(dt.entity.service)
| fieldsAdd endpoint_key = concat(service_name, " :: ", endpoint.name, " :: ", dt.host_group.id)
| filter in(endpoint_key,
  "CustomerFrontendREST :: Images :: et-large",
  "JourneyService :: findJourneys :: et-large"
)
| fieldsAdd total_calls_row = arraySum(calls_per_min)
| summarize total_calls = sum(total_calls_row)

 

comm1.jpg

Current total (last datapoint),  combined calls/min at the end of the chart

timeseries calls_per_min = sum(dt.service.request.count, rate:1m),
  by:{endpoint.name, dt.entity.service, dt.host_group.id},
  interval: 1m
| fieldsAdd service_name = entityName(dt.entity.service)
| fieldsAdd endpoint_key = concat(service_name, " :: ", endpoint.name, " :: ", dt.host_group.id)
| filter in(endpoint_key,
  "CustomerFrontendREST :: Images :: et-large",
  "JourneyService :: findJourneys :: et-large"
)
| fieldsAdd last_cpm_row = arrayLast(calls_per_min)
| summarize last_cpm_total = sum(last_cpm_row)

comm2.jpg

 

Featured Posts