<?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 do you configure props.conf for multiline events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457965#M79154</link>
    <description>&lt;P&gt;Thank you for the reply again. So there is no way to do this before the search?&lt;/P&gt;

&lt;P&gt;My worry is that data volume is huge, and having to search the rows, is trawling through 5 times more data than if I had one line for each event. Is that not true? Basically as I understand your answer, the final "by" clause groups the 5 lines into one in the stats statement.&lt;/P&gt;

&lt;P&gt;I have played around with RegEx, and can identify the key-value-pairs in a RegEx simulator, but when I try to implement it in both props.conf and transforms.conf, I cannot get the EXTRACT-field to work.... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 13:51:37 GMT</pubDate>
    <dc:creator>emilbach</dc:creator>
    <dc:date>2019-04-01T13:51:37Z</dc:date>
    <item>
      <title>How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457961#M79150</link>
      <description>&lt;P&gt;Hi fellow Splunkers!&lt;/P&gt;

&lt;P&gt;Having issues configuring props.conf for sourcing data to Splunk. We have now spent a couple of days trying these forums and testing, but to no avail.&lt;/P&gt;

&lt;P&gt;Basically we have log files in the following format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-03-27T09:00:00.0028098Z;avgsize;WSJYSIPQ01;S:;18547.9245283019
2019-03-27T09:00:00.0028098Z;avgtime;WSJYSIPQ01;S:;0.437509433962264
2019-03-27T09:00:00.0028098Z;count;WSJYSIPQ01;S:;53
2019-03-27T09:00:00.0028098Z;maxtime;WSJYSIPQ01;S:;0.841
2019-03-27T09:00:00.0028098Z;mintime;WSJYSIPQ01;S:;0.234
2019-03-27T09:00:00.0028098Z;avgsize;WSJYSIPQ01;V:;22639.7090909091
2019-03-27T09:00:00.0028098Z;avgtime;WSJYSIPQ01;V:;0.488685714285715
2019-03-27T09:00:00.0028098Z;count;WSJYSIPQ01;V:;385
....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and so on in a repeating pattern, but with varying host and drives (here WSJYSUPQ01 and S for line 1).&lt;/P&gt;

&lt;P&gt;What we would like the data in Splunk to look like after import is this:&lt;/P&gt;

&lt;P&gt;Headers: Timestamp:avgsize:avgtime:count:maxtime:mintime:host:drive&lt;/P&gt;

&lt;P&gt;which would then give one line for each combination of timestamp, host and drive.&lt;/P&gt;

&lt;P&gt;We have figured out how to correctly convert the timestamp. But how do we collapse the multiple lines into one per timestamp-host-drive combination and extract the fields as headers?&lt;/P&gt;

&lt;P&gt;Many thanks!&lt;/P&gt;

&lt;P&gt;br&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457961#M79150</guid>
      <dc:creator>emilbach</dc:creator>
      <dc:date>2019-03-28T13:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457962#M79151</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Try below config on your Indexer/Heavy Forwarder.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
FIELD_DELIMITER=;
FIELD_NAMES=Timestamp,type,ext_host,drive,value
TIMESTAMP_FIELDS=Timestamp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: I have updated above config because the way you want header is not possible. but you can extract those values in total 5 headers &lt;CODE&gt;Timestamp,type,ext_host,drive,value&lt;/CODE&gt; . With these headers &lt;CODE&gt;avgtime, count ....&lt;/CODE&gt; will assign it to header with name &lt;CODE&gt;type&lt;/CODE&gt; , hostname goes to &lt;CODE&gt;ext_host&lt;/CODE&gt; header/field.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 14:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457962#M79151</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-28T14:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457963#M79152</link>
      <description>&lt;P&gt;Hi harsmarvania57,&lt;BR /&gt;
Thank you for your reply.&lt;/P&gt;

&lt;P&gt;I have tested your suggestion and it gives the fields avgtime, count etc. as a value in the field type. This is not as intended. When you say it is impossible to have them as headers, do you mean impossible due to some technical contraint, or that it is just hard, but doable via regex or something? We were thinking to have each set of 5 rows grouped as one event, and then extract each field via regex? Again, thanks for taking the time to reply.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 07:49:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457963#M79152</guid>
      <dc:creator>emilbach</dc:creator>
      <dc:date>2019-03-29T07:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457964#M79153</link>
      <description>&lt;P&gt;To achieve this, you need to index data with headers I have provided in above props.conf config and then you can create search that split those data into different header with their values.&lt;/P&gt;

&lt;P&gt;In my lab environment, I have ingested sample data which you have provided with props.conf config which I have given earlier and then ran below search which is giving result which you require.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt;
| stats list(type) as type, list(value) as value by drive,ext_host,Timestamp
| eval field_merge=mvzip(type,value)
| mvexpand field_merge
| eval a=mvindex(split(field_merge,","),0), b=mvindex(split(field_merge,","),1)
| eval {a}=b
| stats values(avgsize) as avgsize, values(avgtime) as avgtime, values(count) as count, values(mintime) as mintime, values(maxtime) as maxtime by drive,ext_host,Timestamp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 09:12:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457964#M79153</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-29T09:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457965#M79154</link>
      <description>&lt;P&gt;Thank you for the reply again. So there is no way to do this before the search?&lt;/P&gt;

&lt;P&gt;My worry is that data volume is huge, and having to search the rows, is trawling through 5 times more data than if I had one line for each event. Is that not true? Basically as I understand your answer, the final "by" clause groups the 5 lines into one in the stats statement.&lt;/P&gt;

&lt;P&gt;I have played around with RegEx, and can identify the key-value-pairs in a RegEx simulator, but when I try to implement it in both props.conf and transforms.conf, I cannot get the EXTRACT-field to work.... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 13:51:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457965#M79154</guid>
      <dc:creator>emilbach</dc:creator>
      <dc:date>2019-04-01T13:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457966#M79155</link>
      <description>&lt;P&gt;To achieve this at search time on Search Head with props.conf and transforms.conf , you can try below config&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
REPORT-test_hdt = hostdrv_extract
REPORT-test_type = type_extract
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[type_extract]
CLEAN_KEYS = 0
FORMAT = $1::$2
REGEX = ^(?:([^;]*)[;]){2}(?:[^;]*[;]){2}([^\v]*)

[hostdrv_extract]
CLEAN_KEYS = 0
FORMAT = Timestamp::$1 hostname::$2 drive::$3
REGEX = ^([^;]*);(?:[^;]*);([^;]*);([^;]*);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 18:35:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457966#M79155</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-04-01T18:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457967#M79156</link>
      <description>&lt;P&gt;This is not possible with Splunk so you will have to pre-process it with a glue script that you write OR you can use &lt;CODE&gt;cribl&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:21:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457967#M79156</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T20:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457968#M79157</link>
      <description>&lt;P&gt;Thank you again. But I was trying to implement this while loading the data to Splunk, not in a search. Seems it is not possible after all. We will revert to correcting the data creation process I think&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 07:09:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457968#M79157</guid>
      <dc:creator>emilbach</dc:creator>
      <dc:date>2019-04-02T07:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do you configure props.conf for multiline events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457969#M79158</link>
      <description>&lt;P&gt;Thank you. The correct way to handle this would be to run a report on top of the data then, for example daily? (given that I cannot change the input data layout)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 08:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-configure-props-conf-for-multiline-events/m-p/457969#M79158</guid>
      <dc:creator>emilbach</dc:creator>
      <dc:date>2019-04-02T08:45:08Z</dc:date>
    </item>
  </channel>
</rss>

