Splunk Search

count filename form a message

Nilesh067
Explorer

message: 'Successfully downloaded the file : FileAData2020-10-20_19_05_05.csv'

message: 'Successfully downloaded the file : FileBData2020-10-20_19_05_05.csv'

message: 'Successfully downloaded the file : FileCData2020-10-20_19_05_05.csv'

message: 'Successfully downloaded the file : FileAData2020-10-20_19_05_05.csv'

 

how can I get output like 

FileName Count

FileA            2

FileB            1

FileC           1

 

Labels (4)
0 Karma

to4kawa
Ultra Champion
index=_internal | head 1 | eval _raw="message: 'Successfully downloaded the file : FileAData2020-10-20_19_05_05.csv'
message: 'Successfully downloaded the file : FileBData2020-10-20_19_05_05.csv'
message: 'Successfully downloaded the file : FileCData2020-10-20_19_05_05.csv'
message: 'Successfully downloaded the file : FileAData2020-10-20_19_05_05.csv'"
| multikv noheader=t
| rename COMMENT as "the logic" 
| rex "file : (?<filename>\w+)Data"
| stats count by filename
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...