Trying to solve a problem about ‘chaining’ events together.
Here’s a set of typical log lines - (in real life, A1, B2, C2, etc, etc, are all really long, random, unique token strings, not values that are actually related):
request token: proof_token=A1 new_token=A2
request token: proof_token=B1 new_token=B2
request token: proof_token=A2 new_token=A3
request token: proof_token=C1 new_token=C2
request token: proof_token=A3 new_token=A4
request token: proof_token=C2 new_token=C3
If I group them, I get three groups, in that these groups of events all 'chain' together (not because they share the same A, B, and C values in their tokens):
request token: proof_token=A1 new_token=A2
request token: proof_token=A2 new_token=A3
request token: proof_token=A3 new_token=A4
request token: proof_token=B1 new_token=B2
request token: proof_token=C1 new_token=C2
request token: proof_token=C2 new_token=C3
I want to be able to create and report on these groupings of events, ‘chaining’ them together, in Splunk. The first group count of events is 3, the second one is 1, the third one is 2. I would like to add those up, divide by 3, and get an average of the number of times someone is using their first token and keeping the ‘chain’ of token requests going (in this case, the average is 2).
Is there a way to do this? Even the transaction command doesn’t seem to do the trick here? Is there a stats or streamstats trick I can use?
Any help appreciated. Thanks.
... View more