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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...