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!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...