Getting Data In

listdown the sourcetype from the index

splunkpoornima
Communicator

Hi all

i used the below code..to list down the sourcetype of the main indx in the dropdown ..




| metadata type=sourcetype index=main

please correct me if i made an mistake..

thanks in advance

Tags (1)
0 Karma

Ayn
Legend

type=sourcetype is incorrect, it should be type=sourcetypes.

PLEASE PLEASE consult the docs as a first resort.

splunkpoornima
Communicator

finnaly i got the output.now the problem is, i created two dropdowns one for sourcetypes so if i select source type i want the ist of sources in that sourcetype



| metadata type=sourcetypes index="main"



sources $tokenusedindropdown$

0 Karma

Drainy
Champion

That sounds like you have a space somewhere you shouldn't, could you edit your question with the updated xml?

0 Karma

Ayn
Legend

Doesn't sound like a problem in the dropdown.

0 Karma

splunkpoornima
Communicator

actually i changed everything u said..after runing the code..i got got the error as

Error in 'search' command: Unable to parse the search: Comparator '=' is missing a term on the right hand side.

0 Karma

Ayn
Legend

Other errors include: it's populatingSearch, not populatingsearch. It's sourcetype, not SourceType.

splunkpoornima
Communicator

no actually i used type=sourcetypes only but when typing here i missed

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...