<?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 Is there a way to match this and produce result with both uri_path and api_name? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624450#M217105</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;My Access logs:&amp;nbsp;&lt;BR /&gt;server&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;[date&amp;amp; time&lt;/SPAN&gt;&lt;SPAN&gt;] "&lt;/SPAN&gt;&lt;SPAN class=""&gt;GET&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/google/page1/page1a/633243463476/googlep1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;HTTP/1.1&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;350&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;85&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;rex query:&lt;BR /&gt;(?&amp;lt;SRC&amp;gt;\d+\.\d+\.\d+\.\d+).+\]\s\"(?&amp;lt;http_method&amp;gt;\w+)\s(?&amp;lt;serviceName&amp;gt;/[^/]+)(?&amp;lt;uri_path&amp;gt;[^?\s]+)\s(?&amp;lt;uri_query&amp;gt;\S+)\"\s(?&amp;lt;statusCode&amp;gt;\d+)\s(?&amp;lt;body_size&amp;gt;\d+)\s\s(?&amp;lt;response_time&amp;gt;\d+)&lt;BR /&gt;&lt;BR /&gt;Search query with lookup&lt;BR /&gt;*some query*&lt;BR /&gt;| rex field=_raw "(?&amp;lt;SRC&amp;gt;\d+\.\d+\.\d+\.\d+).+\]\s\"(?&amp;lt;http_method&amp;gt;\w+)\s(?&amp;lt;serviceName&amp;gt;/[^/]+)(?&amp;lt;uri_path&amp;gt;[^?\s]+)\s(?&amp;lt;uri_query&amp;gt;\S+)\"\s(?&amp;lt;statusCode&amp;gt;\d+)\s(?&amp;lt;body_size&amp;gt;\d+)\s\s(?&amp;lt;response_time&amp;gt;\d+)"&lt;BR /&gt;| lookup abc.csv uri_path OUTPUT serviceName&amp;nbsp;apiName&lt;/P&gt;
&lt;P&gt;I am using above query to lookup from csv file but not getting any results. In this lookup file i have these fields. apiName is the unique name in this csv file which i am trying to link with the uri_path but not able to do so.&lt;BR /&gt;&lt;BR /&gt;Is there a way to match this and produce result with both uri_path and api_name?&amp;nbsp;can anyone please help me on this?&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;serviceName&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;uri_path&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;http_method&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;apiName&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;/&lt;SPAN class=""&gt;google&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&lt;SPAN class=""&gt;/page1/page1a/633243463476/googlep1&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;post&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;postusingRRR&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Fri, 16 Dec 2022 01:00:22 GMT</pubDate>
    <dc:creator>mikeyty07</dc:creator>
    <dc:date>2022-12-16T01:00:22Z</dc:date>
    <item>
      <title>Is there a way to match this and produce result with both uri_path and api_name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624450#M217105</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;My Access logs:&amp;nbsp;&lt;BR /&gt;server&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;[date&amp;amp; time&lt;/SPAN&gt;&lt;SPAN&gt;] "&lt;/SPAN&gt;&lt;SPAN class=""&gt;GET&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/google/page1/page1a/633243463476/googlep1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;HTTP/1.1&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;350&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;85&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;rex query:&lt;BR /&gt;(?&amp;lt;SRC&amp;gt;\d+\.\d+\.\d+\.\d+).+\]\s\"(?&amp;lt;http_method&amp;gt;\w+)\s(?&amp;lt;serviceName&amp;gt;/[^/]+)(?&amp;lt;uri_path&amp;gt;[^?\s]+)\s(?&amp;lt;uri_query&amp;gt;\S+)\"\s(?&amp;lt;statusCode&amp;gt;\d+)\s(?&amp;lt;body_size&amp;gt;\d+)\s\s(?&amp;lt;response_time&amp;gt;\d+)&lt;BR /&gt;&lt;BR /&gt;Search query with lookup&lt;BR /&gt;*some query*&lt;BR /&gt;| rex field=_raw "(?&amp;lt;SRC&amp;gt;\d+\.\d+\.\d+\.\d+).+\]\s\"(?&amp;lt;http_method&amp;gt;\w+)\s(?&amp;lt;serviceName&amp;gt;/[^/]+)(?&amp;lt;uri_path&amp;gt;[^?\s]+)\s(?&amp;lt;uri_query&amp;gt;\S+)\"\s(?&amp;lt;statusCode&amp;gt;\d+)\s(?&amp;lt;body_size&amp;gt;\d+)\s\s(?&amp;lt;response_time&amp;gt;\d+)"&lt;BR /&gt;| lookup abc.csv uri_path OUTPUT serviceName&amp;nbsp;apiName&lt;/P&gt;
&lt;P&gt;I am using above query to lookup from csv file but not getting any results. In this lookup file i have these fields. apiName is the unique name in this csv file which i am trying to link with the uri_path but not able to do so.&lt;BR /&gt;&lt;BR /&gt;Is there a way to match this and produce result with both uri_path and api_name?&amp;nbsp;can anyone please help me on this?&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;serviceName&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;uri_path&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;http_method&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;apiName&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;/&lt;SPAN class=""&gt;google&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;&lt;SPAN class=""&gt;/page1/page1a/633243463476/googlep1&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;post&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;postusingRRR&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 16 Dec 2022 01:00:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624450#M217105</guid>
      <dc:creator>mikeyty07</dc:creator>
      <dc:date>2022-12-16T01:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup command after rex field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624486#M217108</link>
      <description>&lt;P&gt;Before your lookup command are you saying you have a data field uri_path with contents "&lt;SPAN&gt;/page1/page1a/633243463476/googlep1" and also in your lookup you have the same field uri_path with the same contents, yet the lookup does not return the apiName or serviceName?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you believe that is so, then try these two commands&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval uri_path="/page1/page1a/633243463476/googlep1"
| lookup abc.csv uri_path OUTPUT serviceName apiName

OR

| inputlookup abc.csv where uri_path="/page1/page1a/633243463476/googlep1"
&lt;/LI-CODE&gt;&lt;P&gt;both of these should give you the row from the lookup file.&lt;/P&gt;&lt;P&gt;If not, then the contents of uri_path before the lookup is not that string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 00:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624486#M217108</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-12-16T00:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup command after rex field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624489#M217109</link>
      <description>&lt;P&gt;Yes. For example, I've data like this in csv file. The numbers are different each time so I am using this unique apiName field to gather how much of calls are going to particular api.&lt;/P&gt;&lt;P&gt;with this search query i am able to see the apiName but when i select only one apiName it stills shows different other uri_path as well&lt;BR /&gt;&lt;BR /&gt;&amp;lt;my search query&amp;gt;&lt;BR /&gt;| rex field=_raw "(?&amp;lt;SRC&amp;gt;\d+\.\d+\.\d+\.\d+).+\]\s\"(?&amp;lt;http_method&amp;gt;\w+)\s(?&amp;lt;serviceName&amp;gt;/[^/]+)(?&amp;lt;uri_path&amp;gt;[^?\s]+)\s(?&amp;lt;uri_query&amp;gt;\S+)\"\s(?&amp;lt;statusCode&amp;gt;\d+)\s(?&amp;lt;body_size&amp;gt;\d+)\s\s(?&amp;lt;response_time&amp;gt;\d+)"| search serviceName="*" | lookup abc.csv serviceName OUTPUT uri_path apiName&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;serviceName&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;uri_path&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;http_method&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;apiName&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;/&lt;SPAN class=""&gt;google&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&lt;SPAN class=""&gt;/page1/page1a/*/googlep1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;post&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;postusingRRR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;/&lt;SPAN class=""&gt;google&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;&lt;SPAN class=""&gt;/page1/page1a/sada/*/googlep1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;get&lt;/TD&gt;&lt;TD height="25px"&gt;getusingep2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;/&lt;SPAN class=""&gt;google&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;&lt;SPAN class=""&gt;/pag5/ggg/*/ooopp/ggplr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;delete&lt;/TD&gt;&lt;TD height="25px"&gt;deleteusing&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the two query doesnt seem to work&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 01:27:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624489#M217109</guid>
      <dc:creator>mikeyty07</dc:creator>
      <dc:date>2022-12-16T01:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup command after rex field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624684#M217161</link>
      <description>&lt;P&gt;Ah, now you post the real contents, your uri_paths have * in them, which will not match unless you set up a lookup definition (you are just using a lookup file .csv).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the lookup definition, you have to add WILDCARD(uri_path) in the Match Type advanced options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 23:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-match-this-and-produce-result-with-both-uri/m-p/624684#M217161</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-12-18T23:12:08Z</dc:date>
    </item>
  </channel>
</rss>

