<?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 extract these fields from my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214492#M62904</link>
    <description>&lt;P&gt;Hi somesh, so using rex command is the only way to extract them?....is there a way to use IFX or erex&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2017 13:46:28 GMT</pubDate>
    <dc:creator>vrmandadi</dc:creator>
    <dc:date>2017-01-05T13:46:28Z</dc:date>
    <item>
      <title>How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214489#M62901</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;

&lt;P&gt;Below is the sample event &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event_type:  LogMessage 
    ip:  xx.x.xx.xx 
    job:  router_z1 
    job_index:  1 
    level:  info 
    message_type:  OUT 
    msg:  url.com - [04/01/2017:19:37:03.701 +0000] "GET /api/v1/vha/supported-vehicles HTTP/1.1" 200 0 1565 "-" "fordpass-app-na/17 CFNetwork/808.2.16 Darwin/16.3.0" xx.x.xx.xx:45810 x_forwarded_for:"xxx.xx.xxx.xx, xx.xx.xx.xxx, xx.x.xx.xx" x_forwarded_proto:"https" vcap_request_id:8d612e09-f611-415f-6172-a688700be726 response_time:0.004987 app_id:19065d0e-f6da-4cc3-8a71-581fd768dafe

origin:  gorouter 
source_instance:  1 
source_type:  RTR 
time:  2017-01-04T19:37:03Z 
timestamp:  1483558623706728200
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to extract the "GET /api/v1/vha/supported-vehicles " and other similar kinds like "POST /oauth/token", "GET /eureka/apps/delta" ,GET /api/v1/badges,"GET /api/v1","POST /api/v1/humanify-session"  etc in the message field.&lt;/P&gt;

&lt;P&gt;I tried using the erex command &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;erex clean examples="GET /api/v1/badges,GET /api/v1,POST /api/v1/record" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but it is not showing all of them and I also tried using IFX, but I can only select one field...&lt;/P&gt;

&lt;P&gt;Is there any other way to extract all these fields from the msg app other than regex...&lt;/P&gt;

&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 20:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214489#M62901</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-01-04T20:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214490#M62902</link>
      <description>&lt;P&gt;Is this a json data? &lt;/P&gt;

&lt;P&gt;Try something like for now&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "\]\s+\"(?&amp;lt;message&amp;gt;\w+\s+\S+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Jan 2017 21:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214490#M62902</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-04T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214491#M62903</link>
      <description>&lt;P&gt;If &lt;CODE&gt;GET&lt;/CODE&gt; and &lt;CODE&gt;POST&lt;/CODE&gt; is all you are interested in then you can try this as well:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search
| rex "\"(?&amp;lt;actionUri&amp;gt;(GET|POST)\s*?[\S]+)"
| table actionUri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If additional actions are needed feel free to add in &lt;CODE&gt;(GET|POST|...)&lt;/CODE&gt; part of the above &lt;CODE&gt;rex&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 01:46:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214491#M62903</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2017-01-05T01:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214492#M62904</link>
      <description>&lt;P&gt;Hi somesh, so using rex command is the only way to extract them?....is there a way to use IFX or erex&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 13:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214492#M62904</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-01-05T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214493#M62905</link>
      <description>&lt;P&gt;If your logs and the string that you're trying to extract is not formatted in a standard way (they don't follow same patter/position for all events), the erex and IFX may fail to extract all values. Using your custom regular expression which will explicitly take care of all variation is the way to go in cases like that.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 16:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214493#M62905</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-05T16:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214494#M62906</link>
      <description>&lt;P&gt;ok thank you somesh&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 01:01:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214494#M62906</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-01-06T01:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214495#M62907</link>
      <description>&lt;P&gt;Thank You!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 01:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214495#M62907</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-01-06T01:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214496#M62908</link>
      <description>&lt;P&gt;You'll be able to save the regular expression that you used in search as field extraction, so that its automatically available (similar to what IFX would have done).&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 04:49:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-from-my-sample-data/m-p/214496#M62908</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-06T04:49:54Z</dc:date>
    </item>
  </channel>
</rss>

