Splunk Search

How do I create a query to look at multiple sources which have very similar names but with different numbers at the end?

Jennifer
Path Finder

Hi, all!

Here are the sources that I want to contain at my search:

/appvol/wlp/DIVR01HK-AS01/applogs/appl.log

/appvol/wlp/DIVR01HK-AS01/applogs/appl.log.1

-  /appvol/wlp/DIVR01HK-AS01/applogs/appl.log.2

...

- /appvol/wlp/DIVR01HK-AS01/applogs/appl.log.50

How I could summarize those sources in a simple way in my Search command?

 

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Jennifer,

what do you mean with summarize?

if you want to filter logs with this sources, you can use:

index=your_index source="/appvol/wlp/DIVR01HK-AS01/applogs/appl.log*"
| ...

if you want to count the number of events for each source, you could run something like this:

index=your_index source="/appvol/wlp/DIVR01HK-AS01/applogs/appl.log*"
| stats count BY source

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @Jennifer,

what do you mean with summarize?

if you want to filter logs with this sources, you can use:

index=your_index source="/appvol/wlp/DIVR01HK-AS01/applogs/appl.log*"
| ...

if you want to count the number of events for each source, you could run something like this:

index=your_index source="/appvol/wlp/DIVR01HK-AS01/applogs/appl.log*"
| stats count BY source

Ciao.

Giuseppe

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index=... source=/appvol/wlp/DIVR01HK-AS01/applogs/appl.log*
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...