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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...