I am trying to create a dashboard of external services health. I am able to get list of 20 external services with this DQL, which I am thinking to use a variable input to the dashboard.
fetch dt.entity.service
| fieldsAdd entity.name, publicDomainName
| filter isExternalService
| filter isNotNull(publicDomainName)
| filterOut contains(publicDomainName, “my.com”) // filter out internal or proxy
| filter serviceType == “WEB_REQUEST_SERVICE”
| fields entity.name // could be id
I am not sure how to filter timeseries. My timeseries look like this:
timeseries {
latency_p75 = percentile(dt.service.request.response_time, 75),
latency_p90 = percentile(dt.service.request.response_time, 90),
Throughput = sum(dt.service.request.count),
errors = sum(dt.service.request.failure_count)
},
by: dt.entity.service,
// FILTER services as variable from previous DQL
//filter:{ in(dt.entity.service, classicEntitySelector(concat(“type(service),entityName.equals(\“CashTransfer Service\”)”))) }. //this works but only for one service
| fieldsAdd Service = entityName(dt.entity.service)
| fieldsAdd Latency_p75 = arrayAvg(latency_p75),
Latency_p90 = arrayAvg(latency_p90),
Throughput = arraySum(Throughput),
Errors = arraySum(errors),
dt.entity.service
| fieldsAdd Availability = 100 - (Errors / Throughput) * 100
| fields Service,
Status = if(Availability < 98.00, “
Unhealthy”, else: “
Healthy”),
StatusSort = if(Availability < 98.00, 0, else: 1),
Availability,
Throughput,
Errors,
Latency_p75,
Latency_p90,
dt.entity.service
| sort StatusSort asc

