Hi, I wonder whether someone can help me please.
I've written the following query:
`wso2_wmf(RequestCompleted)`detail.Context=*test "detail.method"=GET OR "detail.method"=POST tags.path="/payments" OR tags.path="/obligations" OR tags.path="/liabilities" OR tags.path="/returns" OR request.tags.path="/returns"
| replace "organisations/*" with * in detail.Context
| dedup eventId date_mday
| eval end_obligations=case('tags.path' like "%obligations%", 1), end_liabilities=case('tags.path' like "%liabilities%", 1), end_payments=case('tags.path' like "%payments%", 1), end_retrieve=case('tags.path' like "%returns/%", 1), end_submit=case('tags.path' like "%returns", 1)
| rename applicationProductionClientId as ClientID
| fillnull value=0
| eval newtime=strftime(_time,"%B")
| stats sum(end_obligations) as obligations sum(end_liabilities) as liabilities sum(end_payments) as payments sum(end_retrieve) as retrieve sum(end_submit) as submit by newtime ClientID
This produces the following output:
newtime ClientID obligations liabilities payments retrieve submit
February 1234 1 3 5 4 3
February 5675 1 10 2 2 5
January 7890 3 2 2 2 2
But I'd like to produce the following:
ClientID obligations liabilities payments retrieve submit
1234 1 3 5 4 3
5675 1 10 2 2 5
February Total 2 13 7 6 8
7890 3 2 2 2 2
January Total 3 2 2 2 2
I've tried using Streamstats, addcoltotals, and although I think I'm close I can't get this to create the desired output.
Could someone perhaps have a look at this please and offer some guidance on where I've gone wrong.
Many thanks and kind regards
Chris
... View more