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*
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...