<?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: Extraction in props.conf not working in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32769#M8556</link>
    <description>&lt;P&gt;Hi it gives me output like this &lt;BR /&gt;
splunkdvg,128,399,6,393&lt;BR /&gt;
appvg,128,478,357,121&lt;BR /&gt;
rootvg,64,559,199,360&lt;BR /&gt;
 but when I use above format it adds VG name to used_pp, I think I need to use LINE_BREAKER but do not know what should be value of line breaker&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:16:24 GMT</pubDate>
    <dc:creator>manuarora</dc:creator>
    <dc:date>2020-09-28T09:16:24Z</dc:date>
    <item>
      <title>Extraction in props.conf not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32767#M8554</link>
      <description>&lt;P&gt;I have following inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://$SPLUNK_HOME/etc/apps/mck-perflog-aix/bin/lsvgdetails.sh]
index = mck-perflog
sourcetype = lsvg_detail
interval = 60
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Script returns output as:-&lt;BR /&gt;
rootvg,64,559,199,360&lt;/P&gt;

&lt;P&gt;I am using following in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[lsvg_detail]
EXTRACT-common = (?&amp;lt;vg_name&amp;gt;[^\,]+),(?&amp;lt;pp_size&amp;gt;[^\,]+),(?&amp;lt;total_pp&amp;gt;[^\,]+),(?&amp;lt;free_pp&amp;gt;[^\,]+),(&amp;lt;used_pp&amp;gt;[^\,]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but it is not extracting field, I do not have any transforms.conf&lt;/P&gt;

&lt;P&gt;Can you please help&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2010 20:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32767#M8554</guid>
      <dc:creator>manuarora</dc:creator>
      <dc:date>2010-08-18T20:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction in props.conf not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32768#M8555</link>
      <description>&lt;P&gt;Any reason why you aren't using delimiter based extractions?  I think that would be simpler in your case.&lt;/P&gt;

&lt;P&gt;That said, the bug seems to be in your regex.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-common = ^(?&amp;lt;vg_name&amp;gt;[^\,]+),(?&amp;lt;pp_size&amp;gt;[^\,]+),(?&amp;lt;total_pp&amp;gt;[^\,]+),(?&amp;lt;free_pp&amp;gt;[^\,]+),(?&amp;lt;used_pp&amp;gt;[^\,]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You were missing a "&lt;CODE&gt;?&lt;/CODE&gt;" at the end (&lt;CODE&gt;used_pp&lt;/CODE&gt;).  I also added a leading "&lt;CODE&gt;^&lt;/CODE&gt;" which will force your regex to start at the beginning of the line; which is better than letting the regex engine guess.&lt;/P&gt;

&lt;P&gt;I didn't change this, but you should note that your entire regex will fail to match if any of the fields you have defined are missing.  That is &lt;CODE&gt;[^\,]+&lt;/CODE&gt; vs &lt;CODE&gt;[^\,]*&lt;/CODE&gt;.  You may or may not want this.  Also, you don't need the backslash before your commas.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;To use a delimiter based extraction, you can do the following:&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[lsvg_detail]
SHOULD_LINEMERGE = False
DATETIME_CONFIG = CURRENT
REPORT-fields = lsvg_detail-fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[lsvg_detail-fields]
DELIMS = ","
FIELDS = "vg_name", "pp_size", "total_pp", "free_pp", "used_pp"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my option this is much simpler to understand and maintain in the future; and it may even be slightly faster than the regex approach (not that you're likely to notice the difference.)  So unless you have a complex field extraction situation (i.e optional columns or very weird quoting logic) the I recommend sticking to the delimiter based approach.  (And that's coming from someone who really enjoys writing and tweaking regular expressions.)&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2010 20:42:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32768#M8555</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-08-18T20:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction in props.conf not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32769#M8556</link>
      <description>&lt;P&gt;Hi it gives me output like this &lt;BR /&gt;
splunkdvg,128,399,6,393&lt;BR /&gt;
appvg,128,478,357,121&lt;BR /&gt;
rootvg,64,559,199,360&lt;BR /&gt;
 but when I use above format it adds VG name to used_pp, I think I need to use LINE_BREAKER but do not know what should be value of line breaker&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32769#M8556</guid>
      <dc:creator>manuarora</dc:creator>
      <dc:date>2020-09-28T09:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction in props.conf not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32770#M8557</link>
      <description>&lt;P&gt;I am using multiple unix echo to display text i.e&lt;BR /&gt;
echo "splunkdvg,128,399,6,393"&lt;BR /&gt;
echo "appvg,128,478,357,121"&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2010 23:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32770#M8557</guid>
      <dc:creator>manuarora</dc:creator>
      <dc:date>2010-08-19T23:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extraction in props.conf not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32771#M8558</link>
      <description>&lt;P&gt;Your problem is probably that you don't a timestamp in your event.  Splunk breaks by default after a timestamp.  You don't want to change LINE_BREAKER in this case (or hardly ever), you simply want to add &lt;CODE&gt;SHOULD_LINEMERGE = False&lt;/CODE&gt; in props.  (I've updated my example above to reflect this.)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:16:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extraction-in-props-conf-not-working/m-p/32771#M8558</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2020-09-28T09:16:26Z</dc:date>
    </item>
  </channel>
</rss>

