Splunk Search

Why does searching by source not work sometimes?

gbronner_rbc
Explorer

This command does not work.

index=grb_test sourcetype=QServiceManagerFormat |  source="\\\\netapp4\\Quants\\ST\logs\\dailyTest20151020_152356rhbyvk\\qservicemanager.20151020.log"

This one returns results:

index=grb_test sourcetype=QServiceManagerFormat 
| where source="\\\\netapp4\\Quants\\ST\logs\\dailyTest20151020_152356rhbyvk\\qservicemanager.20151020.log"

I cannot figure out a reason why. I've tried all manner of escaping the source field in the first search, but can't get it to work.

0 Karma

abhijitmishra87
Explorer

I think the only thing that should follow a pipe( | ) is a splunk command, not a field name.

That is why it worked when you placed a command, 'where' in your case.

Your search should simply be:

index=grb_test sourcetype=QServiceManagerFormat source="\\\\netapp4\\Quants\\ST\logs\\dailyTest20151020_152356rhbyvk\\qservicemanager.20151020.log"

gbronner_rbc
Explorer

Unfortunately, that does't work either; -- the pipe in the first input was actually an artifact of editing.

The query:
index=grb_test sourcetype=QServiceManagerFormat source="\\netapp4\Quants\ST\logs\dailyTest20151020_152356rhbyvk\qservicemanager.20151020.log"

produces zero rows.

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 ...