Splunk Search

Query for Multiple URLs

kvanwagoner
New Member

I'm sure this will be easy for you guys but I"m struggling with it..
I need to modify this query to look for both the http://open/FinalNumbers as well as a URL of https://apicorp.company/open/FinalNumbers

"A GET was made to Open API - Status: OK (http://open/FinalNumbers" | spath AppID | search Environment=prod | timechart count by Environment | bin span=7d _time | stats avg(prod)

Please help!

Tags (3)
0 Karma
1 Solution

jpolvino
Builder

Sounds like you want to OR the URLs:

"A GET was made to Open API - Status: OK (http://open/FinalNumbers" OR "A GET was made to Open API - Status: OK (https://apicorp.company/open/FinalNumbers" | spath AppID | search Environment=prod | timechart count by Environment | bin span=7d _time | stats avg(prod)

Also before the first pipe, you should specify an index and sourcetype at a minimum for efficiency.

View solution in original post

0 Karma

jpolvino
Builder

Sounds like you want to OR the URLs:

"A GET was made to Open API - Status: OK (http://open/FinalNumbers" OR "A GET was made to Open API - Status: OK (https://apicorp.company/open/FinalNumbers" | spath AppID | search Environment=prod | timechart count by Environment | bin span=7d _time | stats avg(prod)

Also before the first pipe, you should specify an index and sourcetype at a minimum for efficiency.

0 Karma

kvanwagoner
New Member

Thanks! That worked!

0 Karma

jpolvino
Builder

Please "accept as answer" the solution that fixes the issue, to help others. Thanks, and glad it worked!

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