Splunk Search

Does wildeward search in source attribute work?

mkelderm
Path Finder

I assume that searching with source=* should work? What could be the reason that this query works:

index=prd_stats sourcetype=appman:*

Results:

12/03/2013 12:15:46.000 ResponseTimems=101
host=l2-iamprdagw04.nl.rsg sourcetype=appman:Script source=heartbeat-randstadnet@l2-iamprdagw04

And this not:

index=prd_stats sourcetype=appman:* source=heartbeat*

no results...

0 Karma
1 Solution

bmacias84
Champion

You search has implied AND. Splunk inserts AND between search terms.

This is what your search is accutually.


index=prd_stats AND sourcetype=appman:* AND source=heartbeat*

This is what I think you trying to do


index=prd_stats AND (sourcetype="appman:*" OR source="heartbeat*")
OR
index=prd_stats AND sourcetype="appman:*" AND source="heartbeat*"

To avoid confusion I explictly define all my boolean search operators.

Additional Reading:

SearchReference

Hope this helps or gets you started. If it does help dont forget to accept and/or vote up.

Cheers,

View solution in original post

bmacias84
Champion

You search has implied AND. Splunk inserts AND between search terms.

This is what your search is accutually.


index=prd_stats AND sourcetype=appman:* AND source=heartbeat*

This is what I think you trying to do


index=prd_stats AND (sourcetype="appman:*" OR source="heartbeat*")
OR
index=prd_stats AND sourcetype="appman:*" AND source="heartbeat*"

To avoid confusion I explictly define all my boolean search operators.

Additional Reading:

SearchReference

Hope this helps or gets you started. If it does help dont forget to accept and/or vote up.

Cheers,

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...