<?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: Extracting fields from a multi line log, with mulitple itterations of data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98842#M20668</link>
    <description>&lt;P&gt;Sounds like you should either:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;preparse the data and separate into individual classes&lt;/LI&gt;
&lt;LI&gt;create a multivalue field that takes the initial class value as input for the field name of curr_conns (must be an indexed field to do this)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You can probably get away with doing some fancy regexes, but you will need to use the multivalue field parameters (MV_ADD in config files, max_matches when using rex).&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:32:46 GMT</pubDate>
    <dc:creator>Simeon</dc:creator>
    <dc:date>2020-09-28T09:32:46Z</dc:date>
    <item>
      <title>Extracting fields from a multi line log, with mulitple itterations of data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98841#M20667</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am extracting logs from the results of a screen scrape on Cisco load balancers.  I used to use some Perl code to pre-parse the data, but I am trying to port that functionality into Splunk.  Below is a some same output:&lt;/P&gt;

&lt;P&gt;slb/prod16# show service-policy LB_123_ABC_POLICY detail&lt;/P&gt;

&lt;P&gt;Status     : ACTIVE&lt;/P&gt;

&lt;P&gt;Description: NONE&lt;/P&gt;

&lt;P&gt;Interface: vlan 1180 4713 6404 &lt;/P&gt;

&lt;P&gt;service-policy: LB_VIP_POLICY&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;class: L4_SSL-123_ABC_CLASS_DEV

  ssl-proxy server: NEW-SSL-PROXY

 VIP Address:    Protocol:  Port:

 10.47.15.16 tcp        eq    443  

  loadbalance:

    L7 loadbalance policy: L7_SSL-123_ABC_POLICY

    VIP Route Metric     : 77

    VIP Route Advertise  : DISABLED

    VIP ICMP Reply       : ENABLED-WHEN-ACTIVE

    VIP State: INSERVICE

    curr conns       : 780         , hit count        : 1251767   

    dropped conns    : 159774    

    client pkt count : 21301490  , client byte count: 2624639829          

    server pkt count : 26552109  , server byte count: 28101998657         

    conn-rate-limit      : 0         , drop-count : 0         

    bandwidth-rate-limit : 0         , drop-count : 0         

    L7 Loadbalance policy : L7_SSL-123_ABC_POLICY

      class/match : class-default

        ssl-proxy client : SSL_PSRVICE_CLIENT

        LB action: : 

           primary serverfarm: prod.thingy:30011

                state: UP

              backup serverfarm : -

        hit count        : 1244324   

        dropped conns    : 1         

class: prod.thingy:30010

 VIP Address:    Protocol:  Port:

 10.47.15.16 tcp        eq    80   

  loadbalance:

    L7 loadbalance policy: prod.thingy:8010

    VIP Route Metric     : 77

    VIP Route Advertise  : DISABLED

    VIP ICMP Reply       : ENABLED

    VIP State: INSERVICE

    curr conns       : 602         , hit count        : 308787    

    dropped conns    : 35        

    client pkt count : 1526460   , client byte count: 130340865           

    server pkt count : 1224022   , server byte count: 208605432           

    conn-rate-limit      : 0         , drop-count : 0         

    bandwidth-rate-limit : 0         , drop-count : 0         

    L7 Loadbalance policy : prod.thingy:8010

      class/match : class-default

        LB action: : 

           primary serverfarm: prod.thingy:30010

                state: UP

              backup serverfarm : -

        hit count        : 308784    

        dropped conns    : 0      
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the detail of two Classes, but IRL, there are many more Classes listed one after another.  I am trying to map the "class:" name with the corresponding "curr conns" that follows. &lt;/P&gt;

&lt;P&gt;Is this possible?  I am thinking that I would be able to grab the other data points if it is ever requested in the future.  Would I be better off pre-parsing the data, like I have in the past?&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:32:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98841#M20667</guid>
      <dc:creator>jamesdon</dc:creator>
      <dc:date>2020-09-28T09:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from a multi line log, with mulitple itterations of data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98842#M20668</link>
      <description>&lt;P&gt;Sounds like you should either:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;preparse the data and separate into individual classes&lt;/LI&gt;
&lt;LI&gt;create a multivalue field that takes the initial class value as input for the field name of curr_conns (must be an indexed field to do this)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You can probably get away with doing some fancy regexes, but you will need to use the multivalue field parameters (MV_ADD in config files, max_matches when using rex).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98842#M20668</guid>
      <dc:creator>Simeon</dc:creator>
      <dc:date>2020-09-28T09:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from a multi line log, with mulitple itterations of data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98843#M20669</link>
      <description>&lt;P&gt;OK, I will keep it simple and pre-parse.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2011 16:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extracting-fields-from-a-multi-line-log-with-mulitple/m-p/98843#M20669</guid>
      <dc:creator>jamesdon</dc:creator>
      <dc:date>2011-05-18T16:53:46Z</dc:date>
    </item>
  </channel>
</rss>

