<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL Language - Pull all URLs with specific query string parameters. in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396253#M68554</link>
    <description>&lt;P&gt;Another example, which is self-contained. Everything up to and including the eval url is generating the test data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=4 
| streamstats count 
| eval url = case( count==1, "http://abc.com/?a=1&amp;amp;b=2&amp;amp;c=3", count==2, "http://abc.com/?d=1&amp;amp;e=2&amp;amp;a=3", count==3, "http://abc.com/?f=1&amp;amp;g=2&amp;amp;h=3", count==4, "http://abc.com/?C=1&amp;amp;b=2&amp;amp;a=3") 
| rex field=url "[^?]*\?(?&amp;lt;url_path&amp;gt;.*)" 
| eval key_values = split(url_path, "&amp;amp;") 
| eval matching_keys=mvfilter(match(key_values, "a=") OR match(key_values, "b=")) 
| where isnotnull(matching_keys) 
| table url, url_path, matching_keys
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Jan 2019 16:41:35 GMT</pubDate>
    <dc:creator>msivill_splunk</dc:creator>
    <dc:date>2019-01-16T16:41:35Z</dc:date>
    <item>
      <title>SQL Language - Pull all URLs with specific query string parameters.</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396251#M68552</link>
      <description>&lt;P&gt;I need help pulling URLs that have a specific query string.&lt;/P&gt;

&lt;P&gt;For example, I get all URLs for the matching query strings. Query string can be in any order.&lt;/P&gt;

&lt;P&gt;abc.com/?a=1&amp;amp;b=2&lt;BR /&gt;
abc.com/?c=1&lt;BR /&gt;
abc.com/?d=1&amp;amp;a=2&lt;BR /&gt;
List all that have a=? or b=? in the URL&lt;/P&gt;

&lt;P&gt;abc.com/?a=1&amp;amp;b=2&lt;BR /&gt;
abc.com/?d=1&amp;amp;a=2&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 20:22:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396251#M68552</guid>
      <dc:creator>alagiriv</dc:creator>
      <dc:date>2019-01-10T20:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Language - Pull all URLs with specific query string parameters.</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396252#M68553</link>
      <description>&lt;P&gt;There are several ways that it could be approached, but one rough way would be as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval path = "abc.com/?a=1&amp;amp;b=2 abc.com/?c=1 abc.com/?d=1&amp;amp;a=2" 
| makemv path 
| mvexpand path 
| rename COMMENT AS "Everything above generates sample event data; everything below is your solution" 
| makemv path delim="?"
| eval params=mvindex(path,1)
| makemv params delim="&amp;amp;"
| mvexpand params | stats values(path) as Paths by params
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Jan 2019 20:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396252#M68553</guid>
      <dc:creator>seegeekrun</dc:creator>
      <dc:date>2019-01-10T20:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Language - Pull all URLs with specific query string parameters.</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396253#M68554</link>
      <description>&lt;P&gt;Another example, which is self-contained. Everything up to and including the eval url is generating the test data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=4 
| streamstats count 
| eval url = case( count==1, "http://abc.com/?a=1&amp;amp;b=2&amp;amp;c=3", count==2, "http://abc.com/?d=1&amp;amp;e=2&amp;amp;a=3", count==3, "http://abc.com/?f=1&amp;amp;g=2&amp;amp;h=3", count==4, "http://abc.com/?C=1&amp;amp;b=2&amp;amp;a=3") 
| rex field=url "[^?]*\?(?&amp;lt;url_path&amp;gt;.*)" 
| eval key_values = split(url_path, "&amp;amp;") 
| eval matching_keys=mvfilter(match(key_values, "a=") OR match(key_values, "b=")) 
| where isnotnull(matching_keys) 
| table url, url_path, matching_keys
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 16:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/396253#M68554</guid>
      <dc:creator>msivill_splunk</dc:creator>
      <dc:date>2019-01-16T16:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Language - Pull all URLs with specific query string parameters.</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/580528#M75869</link>
      <description>&lt;P&gt;Could it be as simple as this?&lt;/P&gt;&lt;P&gt;A search with an implied "AND", using a space:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"abc.com" ("a=" OR "b=")&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 00:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/SQL-Language-Pull-all-URLs-with-specific-query-string-parameters/m-p/580528#M75869</guid>
      <dc:creator>John2</dc:creator>
      <dc:date>2022-01-11T00:00:21Z</dc:date>
    </item>
  </channel>
</rss>

