Hello I have the following sample log lines from a splunk search query line1
line2
line3: field1 : some msg
line4
line5
status: PASS
line6
line7
line3: field2: some msg
line8
line9:
status: PASS
line1
line2
line3: field3: some msg
line4
line5:
status: PASS
line1
line2
line3: field4: some msg
line4
line5:
status: PASS I want to write a transaction to return lines between field1, status: PASS field2, status: PASS field3: status:PASS and so-on I have tried the following search query with multiple startswith values index="test1" source="test2" run="test3"
| transaction source run startswith IN ("field1", "field2", "field3") endswith="status: PASS" Instead of using IN keyword for startswith, I want to use a csv lookup table messages.csv Sample messages.csv content id,Message
1,field1
2,field2
3,field3
4,field4 I want to write splunk transaction command with startswith parameter containing each Message field from messages.csv My inputlookup CSV file may have 100 different rows with different messages There is also a chance that my splunk search results may not have any entries with lines containing field1, field2, field3, field4 Can someone please help on how to write splunk transaction where startswith needs to be run for each Message in messages.csv?
... View more