Guys, I need to collect data on the volume of requests, for example, but considering only a specific period, for example, only Monday to Friday, from 9:00am to 6pm
Has anyone done this? Can you tell me if it is possible via DQL?
I was trying to execute a query in DQL, but the timeseries only returns the timeframe and not the collection timestamp. Can you tell me if it is possible, with the timeseries, to return the timestamp? If I can get this return, I believe I can only show the volume for that period.
timeseries count = sum(dt.service.request.count),
by: { endpoint.name }
| fieldsAdd Total = arraySum(count)
| fieldsAdd time = getStart(timeframe)
| fieldsAdd day = toTimestamp(getStart(timeframe))
| fieldsAdd timeH = formatTimestamp(time, format:"HH")
| fieldsAdd DayOfWeek = getDayOfWeek(day)
| fieldsAdd WeekDay = if(((DayOfWeek == 1)),"Segunda-Feira",
else:if(((DayOfWeek == 2)),"Terça-Feira",
else:if(((DayOfWeek == 3)),"Quarta-Feira",
else:if(((DayOfWeek == 4)),"Quinta-Feira",
else:if(((DayOfWeek == 5)),"Sexta-Feira",
else:if(((DayOfWeek == 6)),"Sábado",
else:if(((DayOfWeek == 7)),"Domingo")
))))))
| fieldsAdd BH = if(timeH > "09" and timeH <= "18","Dentro BH",else:"Fora BH")
//| summarize Total = Sum(Total), by:{endpoint.name,BH}
| filterOut contains(BH,"Fora BH")
I’m using the query above, but as it returns timeframe, that is, it returns the period I’m collecting, these rules won’t work. If I could get the collection timestamp, for example, I believe it would work.
Thank you
