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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...