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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...