<?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: Scripted Input - Multi-line Event Issue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444886#M77439</link>
    <description>&lt;P&gt;I am hoping that I can accomplish this at search time, not index time. So I did not put this on the indexers.&lt;/P&gt;

&lt;P&gt;I changed the props.conf file on the search head where I do the searches for this data and it had no effect.&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 18:21:37 GMT</pubDate>
    <dc:creator>scoughlin1</dc:creator>
    <dc:date>2019-05-02T18:21:37Z</dc:date>
    <item>
      <title>Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444881#M77434</link>
      <description>&lt;P&gt;I have a scripted input that checks disk space used by directories (--max-depth=1 though!).&lt;/P&gt;

&lt;P&gt;So example output looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Bytes                  Path
40395574               /tmp
0                      /net
4952729895             /usr
134266341              /dev
9517345                /bin
39047719               /etc
1124063352             /opt
4363858083             /esupport
4096                   /selinux
28472166               /lib64
4096                   /srv
8655                   /.dbus
4096                   /cgroup
1064258524604          /mnt
16384                  /lost+found
4096                   /media
1333026929             /var
0                      /misc
9788227                /home
448967744              /lib
18931889               /sbin
457042                 /root
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Initially, all the lines showed up in one event. I didn't have anything in the props file that would break each line into its own event at search time. (I later did that for a test machine and it worked fine)&lt;/P&gt;

&lt;P&gt;I then proceeded to put the script on a production machine and noticed that separate events were being created even though I did not put anything into the props.conf for the source type.&lt;/P&gt;

&lt;P&gt;I thought maybe it was a special character in a directory file, or some odd white space character causing Splunk to interpret the output as separate events.&lt;/P&gt;

&lt;P&gt;I wanted to see what running the script looked like on the production system and noticed that it stalled. Well I knew this to be the result of recursively adding all the usage of the many sub-directories below it.&lt;/P&gt;

&lt;P&gt;So what I end up with are three separate events all having the same time stamp the break point being the point in time the script "stalled" while calculating space.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; 5/1/19 2:28:46.000 PM
 40395574               /tmp
 0                      /net
 4952729895             /usr
 134266341              /dev
 9517345                /bin
 39047719               /etc
 1124063352             /opt
 4363858083             /esupport
 4096                   /selinux
 28472166               /lib64
 4096                   /srv
 8655                   /.dbus
 4096                   /cgroup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;5/1/19 2:28:46.000 PM
1064258524604          /mnt
16384                  /lost+found
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;5/1/19 2:28:46.000 PM
1333026929             /var
0                      /misc
9788227                /home
448967744              /lib
18931889               /sbin
457042                 /root
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I prevent Splunk from splitting the output of this script into multiple events (before I have a chance to split then into individual events with a props.conf config)????&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 19:25:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444881#M77434</guid>
      <dc:creator>scoughlin1</dc:creator>
      <dc:date>2019-05-01T19:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444882#M77435</link>
      <description>&lt;P&gt;Try these settings in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time_before_close = &amp;lt;integer&amp;gt;
* The amount of time, in seconds, that the file monitor must wait for
  modifications before closing a file after reaching an End-of-File
  (EOF) marker.
* Tells the input not to close files that have been updated in the
  past 'time_before_close' seconds.
* Default: 3.

multiline_event_extra_waittime = &amp;lt;boolean&amp;gt;
* By default, the file monitor sends an event delimiter when:
  * It reaches EOF of a file it monitors and
  * Ihe last character it reads is a newline.
* In some cases, it takes time for all lines of a multiple-line event to
  arrive.
* Set to "true" to delay sending an event delimiter until the time that the
  file monitor closes the file, as defined by the 'time_before_close' setting,
  to allow all event lines to arrive.
* Default: false.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2019 01:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444882#M77435</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-02T01:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444883#M77436</link>
      <description>&lt;P&gt;I really thought you had my solution. I put these into place and it did not change how Splunk handled the data.&lt;/P&gt;

&lt;P&gt;So I looked up the options and it seems like they are only for the monitor:// stanzas not script:// stanzas.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 12:34:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444883#M77436</guid>
      <dc:creator>scoughlin1</dc:creator>
      <dc:date>2019-05-02T12:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444884#M77437</link>
      <description>&lt;P&gt;Okay... it may not be the "stall" time at all. I just copy and pasted the data out to a text file and uploaded to Splunk. It still breaks the events at the same location.&lt;/P&gt;

&lt;P&gt;So I thought it was related to the numbers (possibly being interpreted as timestamp data?). So I play around and change the data up and sure enough I can cause event breaks to occur when the number of bytes is large.&lt;/P&gt;

&lt;P&gt;Even when I set the props file to DATETIME_CONFIG = NONE the events still break at the large byte count locations.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 15:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444884#M77437</guid>
      <dc:creator>scoughlin1</dc:creator>
      <dc:date>2019-05-02T15:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444885#M77438</link>
      <description>&lt;P&gt;Try this in props.conf on your Indexers/HFs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourcetypeHere]
DATETIME_CONFIG = CURRENT
SHOULD_LINEMERGE = false
LINE_BREAKER = (?!)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Deploy to the first full instance of Splunk that handles the data, restart Splunk there, send in NEW events (old events will stay wrong), and search using &lt;CODE&gt;_index_earliest=-5m&lt;/CODE&gt; to be sure that you are only seeing recently indexed events.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 16:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444885#M77438</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-02T16:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444886#M77439</link>
      <description>&lt;P&gt;I am hoping that I can accomplish this at search time, not index time. So I did not put this on the indexers.&lt;/P&gt;

&lt;P&gt;I changed the props.conf file on the search head where I do the searches for this data and it had no effect.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 18:21:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444886#M77439</guid>
      <dc:creator>scoughlin1</dc:creator>
      <dc:date>2019-05-02T18:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444887#M77440</link>
      <description>&lt;P&gt;No, these settings are ONLY for indexers.  I will give you another answer for search-time but it will not be satisfactory.&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2019 21:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444887#M77440</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-04T21:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444888#M77441</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=YouShouldAlwaysSpecifyAnIndex AND sourcetype=AndSourcetypeToo
| stat list(_raw) AS_raw BY _time host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 May 2019 21:14:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444888#M77441</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-04T21:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444889#M77442</link>
      <description>&lt;P&gt;That search produced one list of all the directories at the time stamp show in my previous post. However, when holding the mouse over the directory items in the list(_raw) column, the background color changed for specific directories that exactly matched how they are "separated" into different events.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 13:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444889#M77442</guid>
      <dc:creator>scoughlin1</dc:creator>
      <dc:date>2019-05-06T13:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444890#M77443</link>
      <description>&lt;P&gt;OK, so add this to the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | nomv _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 May 2019 20:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444890#M77443</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-11T20:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Multi-line Event Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444891#M77444</link>
      <description>&lt;P&gt;While not providing a very specific reason for why I was having this problem. Splunk support asked me to make changes to the props.conf file on the &lt;STRONG&gt;indexer&lt;/STRONG&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;BREAK_ONLY_BEFORE = Bytes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I was reluctant because I wanted search time changes to the data, not index time. In the end, I had to do it as they told me there was no other option.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 13:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Scripted-Input-Multi-line-Event-Issue/m-p/444891#M77444</guid>
      <dc:creator>scoughlin1</dc:creator>
      <dc:date>2019-05-20T13:49:09Z</dc:date>
    </item>
  </channel>
</rss>

