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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...