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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...