Hello!
I am working with the transaction command. I am passing a field and using startswith and endswith definition options. When I run it, though, the output produces two results per transaction. The first contains all events in the transaction while the second, the one I'm looking for, contains the events specified in the definition options. To provide a simplified example, the events in a transaction are as follows:
_time,FIELD,MESSAGE
28/04/2017 00:00:01,FIELD1,Starting Message
28/04/2017 00:00:02,FIELD1,Intermediate Message 1
28/04/2017 00:00:03,FIELD1,Intermediate Message 2
28/04/2017 00:00:04,FIELD1,Intermediate Message 3
28/04/2017 00:00:05,FIELD1,Ending Message
28/04/2017 00:00:11,FIELD2,Starting Message
28/04/2017 00:00:12,FIELD2,Intermediate Message 1
28/04/2017 00:00:13,FIELD2,Intermediate Message 2
28/04/2017 00:00:14,FIELD2,Intermediate Message 3
28/04/2017 00:00:15,FIELD2,Ending Message
The search is then:
index="my_index" | transaction FIELD startswith=eval(MESSAGE="Starting Message") endswith=eval(MESSAGE="Ending Message") | table FIELD, eventcount
Which produces the following table:
FIELD,eventcount
FIELD1,5
FIELD1,2
FIELD2,5
FIELD2,2
Instead, I was expecting
FIELD,eventcount
FIELD1,2
FIELD2,2
How do I ensure that only the transaction containing the startswith and endswith events is returned?
Thank you!
Andrew
... View more