All Apps and Add-ons

Trying to query hadoop but no data or irrelevant results are being returned

jcampbell1977
Explorer

So our main index is our actual index and index_archive is the virtual index that is querying hadoop. When I query only the main index, we get results, but none from our virtual index.

index=main OR index=main_archive
user=exampleuser
| search (NOT "exampleExlude" NOT oauth_client_name=example-productionname )
| where isnotnull(ip_forwarded_for)

| eval source= mvindex(fwd_list, 0)
| eval fwd_list = split(ip_forwarded_for, ",")
| table _time, user, source, authorization_description, authorization_success, user_agent, method, path
| sort _time asc

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

First, at the very least, there is something odd about that code. Did you accidentally copy lines 5 and 6 in reverse order? Here is what I would expect to be the correct order, with the most efficient search usage...

(index=main OR index=main_archive)  user=exampleuser ip_forwarded_for=* 
( NOT oauth_client_name=example-productionname) (NOT "exampleExclude")
| eval source= mvindex(split(ip_forwarded_for,","),0) 
| table _time, user, source, authorization_description, authorization_success, user_agent, method, path 
| sort _time asc

Second, exactly how are the fields ip_forwarded_for and oauth_client_name created? Certain extractions are not available in Hunk virtual indexes. They don't sound like they would apply to those fields, but I'd check that before spending too much time on anything else.

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