<?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 Why is the text Log Broken into Multiple Events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337954#M62384</link>
    <description>&lt;P&gt;We have Powershell logs being written to text files along with a Windows path.  We have a Splunk app monitoring that location for data.  Splunk is ingesting the data from the files, but the data is being broken into numerous events.  For small text files, it might be 2 or 3 events in Splunk for one file.  For larger files, it can be upwards of 7 events.&lt;/P&gt;

&lt;P&gt;Does anyone know why Splunk is ingesting the data in pieces?  We'd prefer to have all of the data from one file in a single event.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;App inputs config:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Windows\Logs\Powershell]
index = winpowershell
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Example Text Content:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#line of asterisks###################
Windows PowerShell transcript start
Start time: 20180129104808
Username: blah\blah
RunAs User: blah\blah
Machine: nameblah (OS version blah)
Host Application: C:\Windows\system32\longscriptblah
Process ID: number
PSVersion: number
PSEdition: thing
PSCompatibleVersions: numbers
BuildVersion: number
CLRVersion: number
WSManStackVersion: number
PSRemotingProtocolVersion: number
SerializationVersion: number
#line of asterisks###################
PS&amp;gt;&amp;amp; 'path'
PS51
PS&amp;gt;$global:?
True
#line of asterisks###################
Windows PowerShell transcript end
End time: 20180129104808
#line of asterisks###################
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Example Splunk Events:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Event 1: 
#line of asterisks###################
Windows PowerShell transcript start
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 2: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Start time: 20180129104808
Username: blah\blah
RunAs User: blah\blah
Machine: nameblah (OS version blah)
Host Application: C:\Windows\system32\longscriptblah
Process ID: number
PSVersion: number
PSEdition: thing
PSCompatibleVersions: numbers
BuildVersion: number
CLRVersion: number
WSManStackVersion: number
PSRemotingProtocolVersion: number
SerializationVersion: number
#line of asterisks###################
PS&amp;gt;&amp;amp; 'path'
PS51
PS&amp;gt;$global:?
True
#line of asterisks###################
Windows PowerShell transcript end
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 3: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;End time: 20180129104808
#line of asterisks###################
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 29 Jan 2018 16:30:57 GMT</pubDate>
    <dc:creator>bteele</dc:creator>
    <dc:date>2018-01-29T16:30:57Z</dc:date>
    <item>
      <title>Why is the text Log Broken into Multiple Events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337954#M62384</link>
      <description>&lt;P&gt;We have Powershell logs being written to text files along with a Windows path.  We have a Splunk app monitoring that location for data.  Splunk is ingesting the data from the files, but the data is being broken into numerous events.  For small text files, it might be 2 or 3 events in Splunk for one file.  For larger files, it can be upwards of 7 events.&lt;/P&gt;

&lt;P&gt;Does anyone know why Splunk is ingesting the data in pieces?  We'd prefer to have all of the data from one file in a single event.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;App inputs config:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Windows\Logs\Powershell]
index = winpowershell
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Example Text Content:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#line of asterisks###################
Windows PowerShell transcript start
Start time: 20180129104808
Username: blah\blah
RunAs User: blah\blah
Machine: nameblah (OS version blah)
Host Application: C:\Windows\system32\longscriptblah
Process ID: number
PSVersion: number
PSEdition: thing
PSCompatibleVersions: numbers
BuildVersion: number
CLRVersion: number
WSManStackVersion: number
PSRemotingProtocolVersion: number
SerializationVersion: number
#line of asterisks###################
PS&amp;gt;&amp;amp; 'path'
PS51
PS&amp;gt;$global:?
True
#line of asterisks###################
Windows PowerShell transcript end
End time: 20180129104808
#line of asterisks###################
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Example Splunk Events:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Event 1: 
#line of asterisks###################
Windows PowerShell transcript start
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 2: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Start time: 20180129104808
Username: blah\blah
RunAs User: blah\blah
Machine: nameblah (OS version blah)
Host Application: C:\Windows\system32\longscriptblah
Process ID: number
PSVersion: number
PSEdition: thing
PSCompatibleVersions: numbers
BuildVersion: number
CLRVersion: number
WSManStackVersion: number
PSRemotingProtocolVersion: number
SerializationVersion: number
#line of asterisks###################
PS&amp;gt;&amp;amp; 'path'
PS51
PS&amp;gt;$global:?
True
#line of asterisks###################
Windows PowerShell transcript end
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 3: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;End time: 20180129104808
#line of asterisks###################
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Jan 2018 16:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337954#M62384</guid>
      <dc:creator>bteele</dc:creator>
      <dc:date>2018-01-29T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the text Log Broken into Multiple Events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337955#M62385</link>
      <description>&lt;P&gt;What are the props.conf settings for the souretype?&lt;BR /&gt;
Depending on how frequently the file is updated, you may want to set &lt;CODE&gt;time_before_close&lt;/CODE&gt; to a value greater than 3 in inputs.conf.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 22:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337955#M62385</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-01-29T22:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the text Log Broken into Multiple Events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337956#M62386</link>
      <description>&lt;P&gt;You will want to configure proper line breaking on this input by specifying the following parameters for this in props.conf on your indexer. For this file it should look something like...&lt;/P&gt;

&lt;P&gt;[source::C:\Windows\Logs\Powershell]&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
LINE_BREAKER = (End time:\s+\d+)([\r\n]+)&lt;BR /&gt;
TIME_FORMAT = %Y%m%d%H%M%S&lt;BR /&gt;
TIME_PREFIX = ^Start Time: &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 14&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337956#M62386</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2020-09-29T17:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the text Log Broken into Multiple Events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337957#M62387</link>
      <description>&lt;P&gt;Hi bteele,&lt;/P&gt;

&lt;P&gt;I think you can use the trick in the &lt;A href="https://answers.splunk.com/answers/5426/entire-file-contents-as-a-single-event.html"&gt;link here&lt;/A&gt; to fulfill your requirement.&lt;BR /&gt;
Basically, you have to use props.conf file in your indexer to merge the incoming events from your powershell sourcetype and set up line breaker to a non-existent word/character.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 22:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337957#M62387</guid>
      <dc:creator>vincenteous</dc:creator>
      <dc:date>2018-01-29T22:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the text Log Broken into Multiple Events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337958#M62388</link>
      <description>&lt;P&gt;Thanks.  I updated the indexer props file with this, but it's still breaking the text up into different events.  I haven't had much time to troubleshoot it further, but wanted to thank you for your help so far.&lt;/P&gt;

&lt;P&gt;Any idea where I should start troubleshooting?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 16:40:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-text-Log-Broken-into-Multiple-Events/m-p/337958#M62388</guid>
      <dc:creator>bteele</dc:creator>
      <dc:date>2018-02-14T16:40:45Z</dc:date>
    </item>
  </channel>
</rss>

