<?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: How to get different URIs in different fields using eval command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324899#M96913</link>
    <description>&lt;P&gt;@gibbs.. You should convert your comment as answer and accept the same.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2017 06:46:54 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-04-13T06:46:54Z</dc:date>
    <item>
      <title>How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324892#M96906</link>
      <description>&lt;P&gt;I have a URI field that contains call to different APIs like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://mydomain.com/A/v1/*" target="test_blank"&gt;http://mydomain.com/A/v1/*&lt;/A&gt;
&lt;A href="http://mydomina.com/B/v1/*" target="test_blank"&gt;http://mydomina.com/B/v1/*&lt;/A&gt;
&lt;A href="http://mydomina.com/C/v1/*" target="test_blank"&gt;http://mydomina.com/C/v1/*&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can i use Splunk, maybe eval, to store calls to an API in a variable, B in another variable and so on?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 19:05:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324892#M96906</guid>
      <dc:creator>gibbs</dc:creator>
      <dc:date>2017-04-11T19:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324893#M96907</link>
      <description>&lt;P&gt;Do you want to create a new field which contain the value A, B, C etc from the URI??&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 20:06:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324893#M96907</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-11T20:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324894#M96908</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;I used to mvfilter along with match to get this.&lt;/P&gt;

&lt;P&gt;I wanted separate fields for A,B, C..... Is there any other way to do this?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 20:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324894#M96908</guid>
      <dc:creator>gibbs</dc:creator>
      <dc:date>2017-04-11T20:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324895#M96909</link>
      <description>&lt;P&gt;What do you mean when you say "to store calls"?  &lt;/P&gt;

&lt;P&gt;Storing the fact that you made a call, or storing the language for the call itself, or something else?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 21:17:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324895#M96909</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-11T21:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324896#M96910</link>
      <description>&lt;P&gt;There may be, depending upon the what the final output that you to achieve. If you just want to add a separate field with those values without any reporting command that your eval is the way to go. If you're creating some other report, there might be other ways. If you could share your search/requirement/mock output, we can have a look.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 21:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324896#M96910</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-11T21:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324897#M96911</link>
      <description>&lt;P&gt;@gibbs what does the event data look like. Can you add a mock? Also like somesoni2 asked... what is your use case once you get API calls as url extracted in a field?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 04:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324897#M96911</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-12T04:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324898#M96912</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I wanted to plot a time chart of the count of requests hitting different APIs. This worked for me.&lt;/P&gt;

&lt;P&gt;source="&lt;EM&gt;"  earliest=-1@d | &lt;BR /&gt;
eval aRequests=mvfilter(match(request_uri,"&lt;A href="http://mydomain.com/A/v1/" target="_blank"&gt;http://mydomain.com/A/v1/&lt;/A&gt;&lt;/EM&gt;")) |&lt;BR /&gt;
eval bRequests=mvfilter(match(request_uri,"&lt;A href="http://mydomain.com/B/v1/*%22)" target="_blank"&gt;http://mydomain.com/B/v1/*")&lt;/A&gt;)  |&lt;BR /&gt;
eval cRequests=mvfilter(match(request_uri,"&lt;A href="http://mydomain.com/C/v1/*%22%22)" target="_blank"&gt;http://mydomain.com/C/v1/*"")&lt;/A&gt;) |&lt;BR /&gt;
timechart count(aRequests) count(bRequests) count(cRequests) &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324898#M96912</guid>
      <dc:creator>gibbs</dc:creator>
      <dc:date>2020-09-29T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324899#M96913</link>
      <description>&lt;P&gt;@gibbs.. You should convert your comment as answer and accept the same.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 06:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324899#M96913</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-13T06:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get different URIs in different fields using eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324900#M96914</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I wanted to plot a time chart of the count of requests hitting different APIs. This worked for me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="*" earliest=-1@d | 
eval aRequests=mvfilter(match(request_uri,"http://mydomain.com/A/v1/*")) |
eval bRequests=mvfilter(match(request_uri,"http://mydomain.com/B/v1/*")) |
eval cRequests=mvfilter(match(request_uri,"http://mydomain.com/C/v1/*"")) |
timechart count(aRequests) count(bRequests) count(cRequests) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Apr 2017 18:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-different-URIs-in-different-fields-using-eval-command/m-p/324900#M96914</guid>
      <dc:creator>gibbs</dc:creator>
      <dc:date>2017-04-13T18:50:32Z</dc:date>
    </item>
  </channel>
</rss>

