Splunk Search

How can I arrange my search result: folder by folder? (I am watching logs in differents folders)

jbosano
Engager

I would like to know how I can arrange my search result folder by folder? (I am watching logs in differents folders) and now I only have a mixed results of any log watching by Splunk

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi jbosano,
what do you mean with folder by folder: divided by source folder?
if thisi s you need, you could extract path form the source and order result for this field, e.g. for unix file system

my_search
| rex field=source "(?<path>.*)\/(?<file>.*?)$"
| stats values(file) AS filename BY path

you can test this regex at https://regex101.com/r/DFHDzl/2

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...