Creating SUMO logic pie chart with SUM totals
I would like to create a SUMO logic pie chart however I am having difficulty doing it with SUM totals. below you can see my query
_sourceCategory=MyAppSource
| parse "* [*] {\"machineName\":*,\"requestPath\":*,\"requestMethod\":*,\"requestSize\":*,\"requestType\":*,\"service\":*,\"duration\":*,\"stack\":*,\"errorMessage\":*,\"errorObject\":*,\"userName\":*,\"clientId\":*,\"statusCode\":*,\"traceIdentifier\":*}" as TimeStamp,Subject,MachineName,RequestPath,RequestMethod,RequestSize,RequestType,Service,Duration,Stack,ErrorMessage,ErrorObject,UserName,ClientID,StatusCode,TraceIdentifier
| if (Duration >= 40, 1, 0) as RequestTimeGreaterThan40ms
| if (Duration < 40, 1, 0) as RequestTimeUnder40ms
| sum(RequestTimeGreaterThan40ms) as RequestTimeGreaterThan40ms, sum(RequestTimeUnder40ms) as RequestTimeUnder40ms
| RequestTimeGreaterThan40ms + RequestTimeUnder40ms as TotalRequest
| (RequestTimeGreaterThan40ms/TotalRequest)*100 as RequestTimeGreaterThan40ms
| (RequestTimeUnder40ms/TotalRequest)*100 as RequestTimeUnder40ms
This produces this result:
https://i.stack.imgur.com/w8Ryu.png
However when I look at my pie chart it looks like this
https://i.stack.imgur.com/j9Bi8.png
**My question:**
As you can see my issue is that the pie chart is only grabbing the first value which would be 4.03717 and nothing else. I need to transpose the other columns into rows so that the pie chart can understand that these are different values and they all need to be represented in the pie chart. Does anyone know what would be the best way to do this?
-
https://stackoverflow.com/questions/55695793/creating-sumo-logic-pie-chart-with-sum-totals/55696397#55696397
Answer by Grzegorz Oledzki a SUMO employee, thank you so much for your help!
Please sign in to leave a comment.
Comments
1 comment