<?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: Line breaking powershell output in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301791#M57022</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Windows:processmonitor]
LINE_BREAKER = ([\r\n]+)EventDate
SHOULD_LINEMERGE = false
TIME_PREFIX = EventDate\s*:\s*
TIME_FORMAT = %Y-%m-%d %H:%M
MAX_TIMESTAMP_LOOKAHEAD = 16
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 May 2017 22:50:13 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-05-19T22:50:13Z</dc:date>
    <item>
      <title>Line breaking powershell output</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301789#M57020</link>
      <description>&lt;P&gt;I've attempted multiple times mixing up LINE_BREAKER, BREAK_ONLY_BEFORE, SHOULD_LINEMERGE, BREAK_ONLY_BEFORE_DATE, nothing seems to work - I've obviously missed something.  &lt;/P&gt;

&lt;P&gt;Sample:&lt;BR /&gt;
...........................&lt;BR /&gt;
EventDate : 2017-05-19 14:20 &lt;BR /&gt;
Host : Server8 &lt;BR /&gt;
InstanceName : oracle &lt;BR /&gt;
CPU_Percent : 15.19 &lt;/P&gt;

&lt;P&gt;EventDate : 2017-05-19 14:20 &lt;BR /&gt;
Host : Server8 &lt;BR /&gt;
InstanceName : oracle &lt;BR /&gt;
CPU_Percent : 12.40 &lt;/P&gt;

&lt;P&gt;EventDate : 2017-05-19 14:20 &lt;BR /&gt;
Host : Server8 &lt;BR /&gt;
InstanceName : powershell &lt;BR /&gt;
CPU_Percent : 0.19&lt;BR /&gt;
...........................&lt;/P&gt;

&lt;P&gt;The data comes in as sourcetype &lt;STRONG&gt;Windows:processmonitor&lt;/STRONG&gt; from a UF and I currently have the following in my indexer props.conf:&lt;BR /&gt;
...........................&lt;BR /&gt;
[Windows:processmonitor]&lt;/P&gt;

&lt;H1&gt;LINE_BREAKER = EventDate&lt;/H1&gt;

&lt;H1&gt;BREAK_ONLY_BEFORE = EventDate&lt;/H1&gt;

&lt;H1&gt;SHOULD_LINEMERGE = false&lt;/H1&gt;

&lt;P&gt;TIME_FORMAT = %Y-%m-%d %H:%M&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = true&lt;BR /&gt;
...........................&lt;/P&gt;

&lt;P&gt;Any advice greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301789#M57020</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2020-09-29T14:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking powershell output</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301790#M57021</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;What is missing is &lt;CODE&gt;SHOULD_LINEMERGE = true&lt;/CODE&gt;, The following stanza in props.conf should work fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Windows:processmonitor]
SHOULD_LINEMERGE = true
TIME_FORMAT = %Y-%m-%d %H:%M
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 22:27:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301790#M57021</guid>
      <dc:creator>aakwah</dc:creator>
      <dc:date>2017-05-19T22:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking powershell output</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301791#M57022</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Windows:processmonitor]
LINE_BREAKER = ([\r\n]+)EventDate
SHOULD_LINEMERGE = false
TIME_PREFIX = EventDate\s*:\s*
TIME_FORMAT = %Y-%m-%d %H:%M
MAX_TIMESTAMP_LOOKAHEAD = 16
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 May 2017 22:50:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301791#M57022</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-19T22:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking powershell output</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301792#M57023</link>
      <description>&lt;P&gt;Thanks all, however no luck so far in either case, unfortunately.&lt;/P&gt;

&lt;P&gt;I did however notice in the health check that there were issues in the 'Event-processing issues' section, relating to events for this sourcetype being too long in bytes, and event max was also an issue. &lt;BR /&gt;
...............&lt;/P&gt;

&lt;P&gt;Message&lt;/P&gt;

&lt;P&gt;Some recently ingested events are triggering event-processing warnings and indicate the presence of one or more of these scenarios:&lt;BR /&gt;
1. Lines in the event are too long, exceeding props.conf / TRUNCATE&lt;BR /&gt;
2. There are too many lines per event, exceeding props.conf / MAX_EVENTS&lt;BR /&gt;
3. The extraction of event time stamps was partially or completely unsuccessful&lt;BR /&gt;
These event-processing issues can have a negative impact on the performance of data ingestion.&lt;BR /&gt;
Suggested Action&lt;/P&gt;

&lt;P&gt;Check the events that are triggering these warnings. Adjust event-processing settings as needed to ensure their proper ingestion.&lt;BR /&gt;
...................&lt;/P&gt;

&lt;P&gt;So I added TRUNCATE and MAX_EVENTS to the stanza, to result in the following:&lt;BR /&gt;
.......................&lt;BR /&gt;
[procmonitor]&lt;BR /&gt;
TRUNCATE = 15000&lt;BR /&gt;
MAX_EVENTS = 300&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)EventDate&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TIME_PREFIX = EventDate\s*:\s*&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 16&lt;BR /&gt;
.......................&lt;BR /&gt;
Note I also changed the sourcetype name just to be sure there was no issue there.&lt;/P&gt;

&lt;P&gt;Now the length and count issues are no longer showing up, but the data is the same one big event.&lt;/P&gt;

&lt;P&gt;I'm wondering if what I see on the screen and what Splunk is looking at are two different things. I'm also wondering if I should modify my script to make the format more digestible to Splunk, somehow - perhaps xml.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-powershell-output/m-p/301792#M57023</guid>
      <dc:creator>a_splunk_user</dc:creator>
      <dc:date>2020-09-29T14:09:37Z</dc:date>
    </item>
  </channel>
</rss>

