Splunk Cloud Platform

How to print number of lines for an event

sathishk1585
New Member

How to print all the events with line numbers, I tried with len(_raw) but it didnt work

Tags (1)
0 Karma

niketn
Legend

@sathishk1585 is your raw event multiline event with newline as delimiter or is it going to be some other field/pattern (if so please provide example)? Do you see multiple lines when you run your raw event search(streaming command without any transforming command)? Can you add some sample data? Mock/Anonymize any sensitive information before posting.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

HiroshiSatoh
Champion

This is a search sentence to add a serial number.

(your search) |streamstats count as line_number
0 Karma
Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...