Splunk Search

Can you help me figure out why my query is not working?

VijaySrrie
Builder
index=* |stats count by sourcetype |table index sourcetype count

The above query displays the sourcetype and count details, but not the index details, Please help me figure out how to proceed.

Tags (1)
0 Karma
1 Solution

vnravikumar
Champion

Hi

try like

index=* |stats count by sourcetype, index

View solution in original post

0 Karma

amiracle
Splunk Employee
Splunk Employee

You might want to look at this free course as well: https://www.splunk.com/en_us/training/free-courses/splunk-fundamentals-1.html

0 Karma

vnravikumar
Champion

Hi

try like

index=* |stats count by sourcetype, index
0 Karma

skoelpin
SplunkTrust
SplunkTrust

Fixed.. Don't use index=* when searching over index time fields

| metasearch 
| stats count by sourcetype, index
0 Karma

VijaySrrie
Builder

|metasearch index=* | stats count by sourcetype, index

is working fine

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 ...