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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...