<?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 for output via Powershell Script in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492552#M84183</link>
    <description>&lt;P&gt;What can I do so fields are automatically extracted, such as &lt;BR /&gt;
NAS ARRAY&lt;BR /&gt;
LATEST SNAPSHOT(In Days)&lt;BR /&gt;
OLDEST SNAPSHOT(In Days)&lt;BR /&gt;
LATEST SNAPSHOT DATE&lt;BR /&gt;
@{Date=05/08/2020; NAS ARRAY=SERVER1; LATEST SNAPSHOT(In Days)=1; LATEST SNAPSHOT DATE=05/08/2020; OLDEST SNAPSHOT(In Days)=107}&lt;BR /&gt;
host = DC2VM-AUTOM-I01 source = Powershell sourcetype = NAS:Snapshot&lt;/P&gt;

&lt;P&gt;As of now ARRAY and DATE is only extracted &lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2020 16:25:58 GMT</pubDate>
    <dc:creator>shugup2923</dc:creator>
    <dc:date>2020-05-08T16:25:58Z</dc:date>
    <item>
      <title>Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492545#M84176</link>
      <description>&lt;P&gt;I have created an app with for running powershell script which gives output as below-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;@{Date=05/08/2020;  ARRAY=Server1; LATEST SNAPSHOT(In Days)=1; LATEST SNAPSHOT DATE=05/07/2020; OLDEST SNAPSHOT(In Days)=62}
@{Date=05/08/2020;  ARRAY=Server2; LATEST SNAPSHOT(In Days)=1; LATEST SNAPSHOT DATE=05/07/2020; OLDEST SNAPSHOT(In Days)=62}
@{Date=05/08/2020;  ARRAY=Server3; LATEST SNAPSHOT(In Days)=1; LATEST SNAPSHOT DATE=05/07/2020; OLDEST SNAPSHOT(In Days)=62}
@{Date=05/08/2020;  ARRAY=Server3; LATEST SNAPSHOT(In Days)=0; LATEST SNAPSHOT DATE=05/08/2020; OLDEST SNAPSHOT(In Days)=112}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These events are coming as a single event, I need every line as a separate event for which I tried giving props.conf for my sourcetype as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_sourcetype]
LINE_BREAKER =([\r\n]+)
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But after this also,I am not able to get separate events ? Any suggestion over this ?&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 08:30:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492545#M84176</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2020-05-08T08:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492546#M84177</link>
      <description>&lt;P&gt;Try and implement the same regex &lt;CODE&gt;([\r\n]+)&lt;/CODE&gt; on your search head as well,by going to sourcetypes, your sourcetype and adding the regex there.&lt;BR /&gt;
 If that doesn't help you try this regex on props and the search head.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\}[\r\n]+[@]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if that helps.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 12:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492546#M84177</guid>
      <dc:creator>shivanshu1593</dc:creator>
      <dc:date>2020-05-08T12:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492547#M84178</link>
      <description>&lt;P&gt;I have a search head cluster, So is there any another way to update sourcetype on search head cluster ?&lt;BR /&gt;
Or we can add on any search head member- by going to sourcetype&amp;gt;add new sourcetype &amp;gt;adding it there ?&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 13:33:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492547#M84178</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2020-05-08T13:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492548#M84179</link>
      <description>&lt;P&gt;Could you try the regex which I gave on the props.conf only and see if that breaks the events for you. Please restart the service as well.&lt;/P&gt;

&lt;P&gt;Where is your props.conf stored? HF, Indexers?&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 14:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492548#M84179</guid>
      <dc:creator>shivanshu1593</dc:creator>
      <dc:date>2020-05-08T14:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492549#M84180</link>
      <description>&lt;P&gt;My props.conf is stored universal forwarder ? will it work from universal forwarder ? &lt;BR /&gt;
or do i need this to updated on indexers ?&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 14:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492549#M84180</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2020-05-08T14:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492550#M84181</link>
      <description>&lt;P&gt;Yeah. This will not work on Universal forwarders. You'll have to implement it on your Indexers. It'll work then.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 15:05:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492550#M84181</guid>
      <dc:creator>shivanshu1593</dc:creator>
      <dc:date>2020-05-08T15:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492551#M84182</link>
      <description>&lt;P&gt;Yes, It worked ,thanks so much&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 16:21:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492551#M84182</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2020-05-08T16:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492552#M84183</link>
      <description>&lt;P&gt;What can I do so fields are automatically extracted, such as &lt;BR /&gt;
NAS ARRAY&lt;BR /&gt;
LATEST SNAPSHOT(In Days)&lt;BR /&gt;
OLDEST SNAPSHOT(In Days)&lt;BR /&gt;
LATEST SNAPSHOT DATE&lt;BR /&gt;
@{Date=05/08/2020; NAS ARRAY=SERVER1; LATEST SNAPSHOT(In Days)=1; LATEST SNAPSHOT DATE=05/08/2020; OLDEST SNAPSHOT(In Days)=107}&lt;BR /&gt;
host = DC2VM-AUTOM-I01 source = Powershell sourcetype = NAS:Snapshot&lt;/P&gt;

&lt;P&gt;As of now ARRAY and DATE is only extracted &lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 16:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492552#M84183</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2020-05-08T16:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492553#M84184</link>
      <description>&lt;P&gt;You have multiple ways to extract these events. You can extract them on your search head using fields extractor, you can also extract them using your props.conf, by using different regexes for different fields. Whatever suits your current requirement the best. I'm using both the methods to extract some fields with different types of data.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 16:56:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492553#M84184</guid>
      <dc:creator>shivanshu1593</dc:creator>
      <dc:date>2020-05-08T16:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Line breaking for output via Powershell Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492554#M84185</link>
      <description>&lt;P&gt;There is not REGEX capture. please fix it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_sourcetype]
pulldown_type = true
LINE_BREAKER = (@{|}[\r\n]+)
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_FORMAT = %m/%d/%Y;
TIME_PREFIX = Date=
category = Custom
description = powershell output
disabled = false
EXTRACT-extractFields = Date=(?&amp;lt;Date&amp;gt;[^;]+);\s*ARRAY=(?&amp;lt;ARRAY&amp;gt;[^;]+);\s[^=]+=(?&amp;lt;latest_Snapshot&amp;gt;\d);\s[^=]+=(?&amp;lt;latest_Snapshot_date&amp;gt;[^;]+);\s[^=]+=(?&amp;lt;oldest_Snapshot&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 May 2020 00:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Line-breaking-for-output-via-Powershell-Script/m-p/492554#M84185</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-09T00:07:04Z</dc:date>
    </item>
  </channel>
</rss>

