Splunk Search

Searches

whitecat001
Explorer

what command can i run if am not sure where an index for a data associated with a sourcetype is stored in splunk

0 Karma

marysan
Communicator

there are several queries :
for example sourcetype=Sample_sourcetype : 
1-

| metadata type=sourcetypes
| search sourcetype=Sample_sourcetype
| table index, sourcetype


2-

| tstats count where sourcetype=Sample_sourcetype by index | table index

 

Tags (2)
0 Karma

antoniolamonica
Explorer

you could try:

index=*
| stats values(sourcetype) as sourcetype by index
| table index, sourcetype


this will provide all sourcetypes associated to their index, based on the timeframe given and if they contain event logs during that time frame. 

Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @whitecat001,

you could try:

index=* sourcetype=your_sourcetype

in this way you can know which is the index.

Ciao.

Giuseppe

0 Karma

whitecat001
Explorer

thank you

0 Karma

deepakc
Builder
| tstats count where index=* by index, sourcetype
0 Karma
Get Updates on the Splunk Community!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...