<?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 scripted inputs output varies based on host in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/scripted-inputs-output-varies-based-on-host/m-p/72541#M14796</link>
    <description>&lt;P&gt;I have deployed an app to RHEL 5.6 hosts with the deployment server. The app is a shell script that issues a few lines. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/bash
date
echo running ls -l /var/log
ls -l /var/log
echo end
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On a few hosts, I see all of the output returned from the directory listing. On most hosts, I only see the a 10th of the needed output. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;running ls -al /var/log
total 1792
-rw-r----- 1 root root    1085 Jul 12 19:54 acpid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The output of the script stops at the first entry of /var/log. On other hosts, I get the complete output of the command. &lt;/P&gt;

&lt;P&gt;I have even tried to create a unique sourcetype named shell in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[shell]
BREAK_ONLY_BEFORE=^end
MAX_EVENTS=500
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Sep 2011 17:01:09 GMT</pubDate>
    <dc:creator>lisaac</dc:creator>
    <dc:date>2011-09-09T17:01:09Z</dc:date>
    <item>
      <title>scripted inputs output varies based on host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/scripted-inputs-output-varies-based-on-host/m-p/72541#M14796</link>
      <description>&lt;P&gt;I have deployed an app to RHEL 5.6 hosts with the deployment server. The app is a shell script that issues a few lines. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/bash
date
echo running ls -l /var/log
ls -l /var/log
echo end
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On a few hosts, I see all of the output returned from the directory listing. On most hosts, I only see the a 10th of the needed output. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;running ls -al /var/log
total 1792
-rw-r----- 1 root root    1085 Jul 12 19:54 acpid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The output of the script stops at the first entry of /var/log. On other hosts, I get the complete output of the command. &lt;/P&gt;

&lt;P&gt;I have even tried to create a unique sourcetype named shell in props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[shell]
BREAK_ONLY_BEFORE=^end
MAX_EVENTS=500
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2011 17:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/scripted-inputs-output-varies-based-on-host/m-p/72541#M14796</guid>
      <dc:creator>lisaac</dc:creator>
      <dc:date>2011-09-09T17:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: scripted inputs output varies based on host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/scripted-inputs-output-varies-based-on-host/m-p/72542#M14797</link>
      <description>&lt;P&gt;It is now working. The following worked:&lt;/P&gt;

&lt;P&gt;1) I had to ensure that the script captured stderr to stdout (e.g. /bin/ls -l /var/log 2&amp;gt;&amp;amp;1). This was evident after looking at the _iternal index for the cause of the error (e.g. No such file or directory). &lt;/P&gt;

&lt;P&gt;2) In props.conf, I set the following:&lt;/P&gt;

&lt;P&gt;[shell]&lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE_DATE=false&lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE=^end&lt;/P&gt;

&lt;P&gt;MAX_EVENTS=5000&lt;/P&gt;

&lt;P&gt;SHOULD_LINEMERGE = True&lt;/P&gt;

&lt;P&gt;3) I adjusted the script as follows:&lt;/P&gt;

&lt;P&gt;#!/bin/bash&lt;/P&gt;

&lt;P&gt;echo end&lt;/P&gt;

&lt;P&gt;date&lt;/P&gt;

&lt;P&gt;echo running ls -l /var/log&lt;/P&gt;

&lt;P&gt;ls -l /var/log&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/scripted-inputs-output-varies-based-on-host/m-p/72542#M14797</guid>
      <dc:creator>lisaac</dc:creator>
      <dc:date>2020-09-28T09:54:59Z</dc:date>
    </item>
  </channel>
</rss>

