Splunk Search

How to add a first column to number each row in a table so when I export to csv, the results are a list of numbered items?

New Member

I have a search with a table as an output, but I want to add the first column to number each row so when I export to csv, the consumers can see the number of items easily. The current search I am using:

index=* action!=blocked dest_ip=< ip's > action!=blocked | dedup src_ip | table _time, src_ip, dest_ip, action, url
Tags (4)
0 Karma

Contributor
index=* action!=blocked dest_ip=< ip's > action!=blocked | dedup src_ip | table _time, src_ip, dest_ip, action, url | streamstats count as row | fields row *

New Member

Thank you but for some reason I see two now.....

blank Row _time
1 1

0 Karma

Contributor

Can you change the endin to fields row,_time, src_ip, dest_ip, action, url

0 Karma
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!