<?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 can I merge events from powershell input? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/556700#M92129</link>
    <description>&lt;P&gt;powershell inputs expect the command to return PS Objects and every object will be a separate event. Find a template to convert string output to objects here:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/powershell-input-working-example-and-some-pitfalls/m-p/556695#M92128" target="_self"&gt;https://community.splunk.com/t5/Getting-Data-In/powershell-input-working-example-and-some-pitfalls/m-p/556695#M92128&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 13:54:54 GMT</pubDate>
    <dc:creator>ololdach</dc:creator>
    <dc:date>2021-06-22T13:54:54Z</dc:date>
    <item>
      <title>How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396806#M70712</link>
      <description>&lt;P&gt;I want to get events from below powershell input.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [powershell://power_shell_sapmle]
 script = . "$SplunkHome\etc\apps\sample_app\bin\sample.ps1"
 schedule = */1 * * * *
 sourcetype = power_shell_sapmle
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sample.ps1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; $Output = invoke-expression "wmic cpu list brief"
 Write-Output $Output
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, the event is divided and outputted line by line, even if I configured &lt;CODE&gt;props.conf&lt;/CODE&gt; in &lt;CODE&gt;Indexer&lt;/CODE&gt; like below.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[power_shell_sapmle]
DATETIME_CONFIG = CURRENT
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE_DATE = false
MAX_EVENTS = 1000
BREAK_ONLY_BEFORE = "NEVER_BREAKE_LINE"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I merge these events to 1 event?&lt;BR /&gt;
Please someone help me.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;*additional info&lt;/P&gt;

&lt;P&gt;Output event of this powershell input like below.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6357iC01E145A890E2E7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 06:50:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396806#M70712</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2019-01-11T06:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396807#M70713</link>
      <description>&lt;P&gt;Can you share sample output you are getting by script?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 09:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396807#M70713</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2019-01-11T09:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396808#M70714</link>
      <description>&lt;P&gt;One option to troubleshoot yourself is to get a sample of your data into a file and then use the "Add data" wizard in your Splunk instance to see how Splunk with treat your data while playing with the props.conf parameters interactively.&lt;/P&gt;

&lt;P&gt;This should help you quickly troubleshoot and get to a working configuration.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 13:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396808#M70714</guid>
      <dc:creator>ccl0utier</dc:creator>
      <dc:date>2019-01-11T13:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396809#M70715</link>
      <description>&lt;P&gt;Like this in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [power_shell_sapmle]
 DATETIME_CONFIG = CURRENT
 SHOULD_LINEMERGE = false
 LINE_BREAKER = (?!)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jan 2019 21:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396809#M70715</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-11T21:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396810#M70716</link>
      <description>&lt;P&gt;Thank you for answer!&lt;/P&gt;

&lt;P&gt;But, I can't merge by that settings...&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 00:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396810#M70716</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2019-01-15T00:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396811#M70717</link>
      <description>&lt;P&gt;I do not understand what you mean.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 03:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396811#M70717</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-15T03:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396812#M70718</link>
      <description>&lt;P&gt;I mean that I put the setting you suggested in &lt;CODE&gt;props.conf&lt;/CODE&gt;, but as before, the data captured by the powershell input was split into one event per line.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 05:15:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396812#M70718</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2019-01-15T05:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396813#M70719</link>
      <description>&lt;P&gt;You should NOT be using any &lt;CODE&gt;merge settings&lt;/CODE&gt;.  Just use my 3 and nothing else.&lt;BR /&gt;
Make sure that if you are using sourcetype-override, that you use the &lt;EM&gt;original&lt;/EM&gt; sourcetype.&lt;BR /&gt;
Deploy all settings to your Heavy Forwarder and Indexer tiers.&lt;BR /&gt;
Restart all Splunk instances there.&lt;BR /&gt;
Send in new data and search for it with an &lt;CODE&gt;All time&lt;/CODE&gt; value for &lt;CODE&gt;Timepicker&lt;/CODE&gt; and &lt;CODE&gt;index_earliest=-5m&lt;/CODE&gt; so that you FOR SURE are looking at recently-indexed events.&lt;BR /&gt;
This will work.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 01:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396813#M70719</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-14T01:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396814#M70720</link>
      <description>&lt;P&gt;I have just tried again, but it still not work.&lt;/P&gt;

&lt;P&gt;I writes below things just in case.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I have used &lt;STRONG&gt;ONLY&lt;/STRONG&gt; your 3 settings.&lt;/LI&gt;
&lt;LI&gt;Also I have just created new sourcetype "power_shell_sapmle_20190213", so sourcetype-override is &lt;STRONG&gt;impossible&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;I have deployed &lt;CODE&gt;inputs.conf&lt;/CODE&gt; and &lt;CODE&gt;powershell script&lt;/CODE&gt; to Heavy Forwarder, and put &lt;CODE&gt;props.conf&lt;/CODE&gt; to Indexer with your 3 settings, then restarted both.&lt;/LI&gt;
&lt;LI&gt;I have checked events by using &lt;STRONG&gt;real-time search&lt;/STRONG&gt;, but it has never worked.&lt;/LI&gt;
&lt;LI&gt;Splunk Ver is 7.2.3&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If you can do it in your verification environment, would you please show me?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396814#M70720</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2020-09-29T23:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396815#M70721</link>
      <description>&lt;P&gt;You are not taking me literally enough.  The problem is that you have not deployed the props.conf settings to your Heavy Forwarder tier.  The index-time settings of props.conf (including timestamping and line-splitting) happen on the FIRST FULL INSTANCE of Splunk that is encountered along the way.  In your case, that is your Heavy Forwarders.  Put props.conf there, restart Splunk everywhere, test the way that I mentioned, and you will be good-to-go.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 02:17:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396815#M70721</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-14T02:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396816#M70722</link>
      <description>&lt;P&gt;You could change your PowerShell script to output in json format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Get-WmiObject Win32_Processor | Select-Object Caption,DeviceID,Manufacturer,MaxClockSpeed,Name,SocketDesignation | ConvertTo-Json -Compress
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Feb 2019 03:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396816#M70722</guid>
      <dc:creator>spayneort</dc:creator>
      <dc:date>2019-02-14T03:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396817#M70723</link>
      <description>&lt;P&gt;I'm sorry, my explanation was wrong.&lt;/P&gt;

&lt;P&gt;My environment, I have these instances.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Splunk Indexer&lt;/LI&gt;
&lt;LI&gt;Splunk Universal forwarder(* not heavy forwarder)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;My Universal Forwarder on Windows executes powershell script, and forwards to Indexer.&lt;BR /&gt;
Therefore, I think that putting props.conf in Indexer is not wrong. &lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 07:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396817#M70723</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2019-02-14T07:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396818#M70724</link>
      <description>&lt;P&gt;Just try it.  You have nothing to lose.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 07:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396818#M70724</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-14T07:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396819#M70725</link>
      <description>&lt;P&gt;I have deleted props.conf of indexer and deployed props.conf to universal forwarder, then I have restarted both.&lt;/P&gt;

&lt;P&gt;Thankfully for suggesting, but it still not work...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 07:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396819#M70725</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2019-02-14T07:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396820#M70726</link>
      <description>&lt;P&gt;I was able to get cpu data by changing powershell to yours.&lt;BR /&gt;
But I still wonder if I can not acquire it as a single event unless I change the output of powershell itself...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 07:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/396820#M70726</guid>
      <dc:creator>yutaka1005</dc:creator>
      <dc:date>2019-02-14T07:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I merge events from powershell input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/556700#M92129</link>
      <description>&lt;P&gt;powershell inputs expect the command to return PS Objects and every object will be a separate event. Find a template to convert string output to objects here:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/powershell-input-working-example-and-some-pitfalls/m-p/556695#M92128" target="_self"&gt;https://community.splunk.com/t5/Getting-Data-In/powershell-input-working-example-and-some-pitfalls/m-p/556695#M92128&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 13:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-merge-events-from-powershell-input/m-p/556700#M92129</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2021-06-22T13:54:54Z</dc:date>
    </item>
  </channel>
</rss>

