<?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 a field that appears several times, but with different values for every event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181009#M52168</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;.. | rex field=_raw "\'Via\'\s\'(?&amp;lt;viavalue&amp;gt;.*)\'" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;viavalue would have the text between the single quote after via&lt;/P&gt;</description>
    <pubDate>Fri, 20 Mar 2015 02:45:56 GMT</pubDate>
    <dc:creator>ramdaspr</dc:creator>
    <dc:date>2015-03-20T02:45:56Z</dc:date>
    <item>
      <title>How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181008#M52167</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;

&lt;P&gt;Can you give me a hand with the following case:&lt;/P&gt;

&lt;P&gt;I have the following log and desire to extract a field that appears several times, but with different values for every event. The log is a sip server.&lt;/P&gt;

&lt;P&gt;The field to be created is "via" with the respective values in front of each of them.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'Via' 'SIP/2.0/UDP 172.20.30.219;rport;branch=z9hG4bK915603406529843-AP;ft=172.20.30.219~13c4' 
'Via' 'SIP/2.0/UDP 172.20.30.218:15060;rport=15060;ibmsid=local.1423076844553_14140521_14153316;branch=z9hG4bK915603406529843' 
'Via' 'SIP/2.0/UDP 172.20.30.218:15060;rport;ibmsid=local.1423076844553_14140520_14153315;branch=z9hG4bK796372520547692' 
'Via' 'SIP/2.0/TLS 172.20.30.219;branch=z9hG4bK0fcbd45fcd1e41df3a54ebe9bc00-AP;ft=33364;received=172.20.30.219;rport=22178' 
'Via' 'SIP/2.0/TLS 172.20.30.41;branch=z9hG4bK0fcbd45fcd1e41df3a54ebe9bc00' 
'Via' 'SIP/2.0/TCP 172.20.30.33;branch=z9hG4bK0fcbd45fcd1e41df3a54ebe9bc00'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and within those same lines is the "branch" field that also has different values.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2015 22:39:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181008#M52167</guid>
      <dc:creator>fmaldonado6441</dc:creator>
      <dc:date>2015-03-19T22:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181009#M52168</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;.. | rex field=_raw "\'Via\'\s\'(?&amp;lt;viavalue&amp;gt;.*)\'" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;viavalue would have the text between the single quote after via&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2015 02:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181009#M52168</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-03-20T02:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181010#M52169</link>
      <description>&lt;P&gt;Hi &lt;BR /&gt;
You can use this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; .... | rex field=_raw   "\'Via\'\s\'(?&amp;lt;value&amp;gt;.*)\'" | table value | rename value as via 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Tell me if it satisfy you please&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2015 10:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181010#M52169</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-03-20T10:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181011#M52170</link>
      <description>&lt;P&gt;Thanks for your support, but it is not exactly what I'm looking for, is that a single event can have multiple lines with informacińo of "via" so the rex suggesting I only extracts the first match, what I want to achieve is to extract the value of the "via" field displays how many times per event.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2015 14:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181011#M52170</guid>
      <dc:creator>fmaldonado6441</dc:creator>
      <dc:date>2015-03-20T14:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181012#M52171</link>
      <description>&lt;P&gt;Thanks for your support, but it is not exactly what I'm looking for, is that a single event can have multiple lines with informacińo of "via" so the rex suggesting I only extracts the first match, what I want to achieve is to extract the value of the "via" field displays how many times per event.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2015 14:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181012#M52171</guid>
      <dc:creator>fmaldonado6441</dc:creator>
      <dc:date>2015-03-20T14:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181013#M52172</link>
      <description>&lt;P&gt;Means the sample data you gave bellow is a single event? if not, can you give a sample data, where we can see an event with several values of &lt;STRONG&gt;val&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 08:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181013#M52172</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-03-30T08:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181014#M52173</link>
      <description>&lt;P&gt;That's right, what values are in the post are from a single event.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 13:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181014#M52173</guid>
      <dc:creator>fmaldonado6441</dc:creator>
      <dc:date>2015-03-30T13:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field that appears several times, but with different values for every event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181015#M52174</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The solution to my problem was given by adding the parameter "MV_ADD = 1" in the transforms.conf file, basically this parameter allowing to make is that extraction will not stop when it finds a match.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sip]
BREAK_ONLY_BEFORE = ^@
NO_BINARY_CHECK = true
disabled = false
REPORT-via-extract = via-extract
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[via-extract]
CLEAN_KEYS = 0
MV_ADD = 1
REGEX = 'Via'\s+'(?&amp;lt;sip_via&amp;gt;[^\']+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you all for your contributions.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 13:38:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-that-appears-several-times-but-with/m-p/181015#M52174</guid>
      <dc:creator>fmaldonado6441</dc:creator>
      <dc:date>2015-03-30T13:38:30Z</dc:date>
    </item>
  </channel>
</rss>

