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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...