Splunk Search

Add To Search Returns No Results

lynmar
Explorer

I have an index in Splunk enterprise named "my_index". When I search for data using index="my_index" for the last 24 hours I get all results I want. I have some custom tags\fields for instance branch, version, product etc that I want to filter on.

When I click on the branch from the events viewer and click add to search no results are found, even though they were there in the previous results returned for the same time period. Similarly when I type into the search bar and select the autocomplete for the branch I want nothing is returned.

What is the reason this is happening?

Searching index="my_index" in the last 24hrs returns results including branch="mybranch-1-2" but searching for index="my_index" branch="mybranch-1-2" for the last 24hrs returns no results found.

0 Karma
1 Solution

lynmar
Explorer

I needed to change to use colons as apparently it is meta data I'm adding to search. Splunks add to search functionality is misleading.

Wroks:
index="my_index" branch::mybranch

Doesn't work:
index="my_index" branch="mybranch"

View solution in original post

0 Karma

shaikasi
New Member

Try this and its works

index=a

0 Karma

lynmar
Explorer

I needed to change to use colons as apparently it is meta data I'm adding to search. Splunks add to search functionality is misleading.

Wroks:
index="my_index" branch::mybranch

Doesn't work:
index="my_index" branch="mybranch"

0 Karma

niketn
Legend

Can you try the following search?

index="my_index"
| search branch="mybranch-1-2"
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

DalJeanis
SplunkTrust
SplunkTrust

Switch to verbose mode, and try this...

index="my_index" | search branch="mybranch*" | head 1

If there are results, try this....

index="my_index" branch="mybranch*" | head 1

If they are still there, then switch back to fast mode and see if they disappear.

Let us know what happened.

0 Karma

lynmar
Explorer

Those suggestions didn't work. I tried them both in fast mode, verbose mode and smart mode.

This doesn't work:

index="my_index" branch="release-5-5"

This Works

index="my_index" branch="blah-blah"

Both the above examples are returned in the original search index="my_index"

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...