<?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: Configuring outputs.conf for an &amp;quot;all in one&amp;quot; box in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516828#M87472</link>
    <description>&lt;P&gt;I was reviewing the docs on inputs because I am not getting data in right now and came across that under the scripted inputs section:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;send_index_as_argument_for_path = &amp;lt;boolean&amp;gt;
* Whether or not to pass the index as an argument when specified for
  stanzas that begin with 'script://'
* When this setting is "true", the script passes the argument as
  '-index &amp;lt;index name&amp;gt;'.
* To avoid passing the index as a command line argument, set this to "false".
* Default: true.&lt;/LI-CODE&gt;&lt;P&gt;Anyway, it's commented out now and restarted splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This shows up in _internal (and has been on every restart in my troubleshooting) but still no data is coming in.&amp;nbsp; I ran the script manually to ensure it is working (as the splunk user) and JSON data is printing to screen so I know it does work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;08-29-2020 05:37:09.605 +0000 INFO  ExecProcessor - New scheduled exec process: /opt/splunk/etc/apps/TA-HackerOne/bin/hacker_one_pull.sh&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 Aug 2020 05:41:29 GMT</pubDate>
    <dc:creator>DEADBEEF</dc:creator>
    <dc:date>2020-08-29T05:41:29Z</dc:date>
    <item>
      <title>Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516824#M87468</link>
      <description>&lt;P&gt;I stood up a test instance of Splunk&amp;nbsp; that is a "all in one" system, that is indexer and search head.&amp;nbsp; I wrote an app that pulls data via REST API but realized I wasn't sure if I needed to ensure it had a custom outputs.conf if I am "sending" to the same system.&lt;/P&gt;&lt;P&gt;Since it is acting as in indexer, wouldn't it immediately pull the data and then index it without needing a /local/outputs.conf?&amp;nbsp; I wasn't sure and couldn't find any clear documentation explaining this specific scenario.&lt;/P&gt;&lt;P&gt;My script pulls data but I don't have anything populating the main index.&amp;nbsp; If I run the script manually, the data prints to stdout as expected.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 04:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516824#M87468</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2020-08-29T04:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516825#M87469</link>
      <description>&lt;P&gt;You should invoke script using splunk inputs.conf to collect events which are printed upon script execution.&lt;/P&gt;&lt;P&gt;can you share inputs.conf which will call your script?&lt;/P&gt;&lt;P&gt;if you don’t have created, create one like below:&lt;/P&gt;&lt;P&gt;[script://./bin/yourscript.extension]&lt;BR /&gt;index=&amp;lt;indexname&amp;gt;&lt;BR /&gt;interval = &amp;lt;set frequency &amp;gt;&lt;BR /&gt;sourcetype = &amp;lt;set sourcetype&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Inputsconf" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Inputsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 05:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516825#M87469</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-29T05:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516826#M87470</link>
      <description>&lt;P&gt;I have an inputs, props, and my script.&amp;nbsp; My script file is in /opt/splunk/etc/apps/&amp;lt;myapp&amp;gt;/bin/hacker_one_pull.sh&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://./bin/hacker_one_pull.sh]
index = main
interval = 600
sourcetype = h1:json
source = api_hackerone
disabled = false
send_index_as_argument_for_path = false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 05:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516826#M87470</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2020-08-29T05:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516827#M87471</link>
      <description>&lt;P&gt;Any reason for adding below:&lt;/P&gt;&lt;PRE&gt;send_index_as_argument_for_path &lt;/PRE&gt;&lt;P&gt;can you remove that line and restart splunk service and check.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 05:34:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516827#M87471</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-29T05:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516828#M87472</link>
      <description>&lt;P&gt;I was reviewing the docs on inputs because I am not getting data in right now and came across that under the scripted inputs section:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;send_index_as_argument_for_path = &amp;lt;boolean&amp;gt;
* Whether or not to pass the index as an argument when specified for
  stanzas that begin with 'script://'
* When this setting is "true", the script passes the argument as
  '-index &amp;lt;index name&amp;gt;'.
* To avoid passing the index as a command line argument, set this to "false".
* Default: true.&lt;/LI-CODE&gt;&lt;P&gt;Anyway, it's commented out now and restarted splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This shows up in _internal (and has been on every restart in my troubleshooting) but still no data is coming in.&amp;nbsp; I ran the script manually to ensure it is working (as the splunk user) and JSON data is printing to screen so I know it does work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;08-29-2020 05:37:09.605 +0000 INFO  ExecProcessor - New scheduled exec process: /opt/splunk/etc/apps/TA-HackerOne/bin/hacker_one_pull.sh&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 05:41:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516828#M87472</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2020-08-29T05:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516829#M87473</link>
      <description>&lt;P&gt;Can you set all time range and Search with sourcetype and index given in inputs.conf&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 05:53:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516829#M87473</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-29T05:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516830#M87474</link>
      <description>&lt;P&gt;and also, share your props.conf&lt;/P&gt;&lt;P&gt;confirm if there is timestamp in json logs printing from script.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 06:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516830#M87474</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-29T06:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516848#M87477</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;this should works.&lt;/P&gt;&lt;P&gt;inputs.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;[script://$SPLUNK_HOME/etc/apps/&amp;lt;your app name&amp;gt;/bin/json.sh]
disabled = false
index = test
interval = 60.0
sourcetype = json_no_timestamp&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;#!/bin/bash
echo '{"a":"a","b":"b","c":1,"d":{"aa":1,"ab":"ba"}}'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have your own sourcetype for that script (h1:json) which is as best practices said. Can you share that definition and also sample of your scripts output so the Community can help you to verify that there haven't been any weirdness?&lt;/P&gt;&lt;P&gt;One hint: Don't use both INDEXED_EXTRACTIONS and KV_MODE at same time or you will get duplicate events!&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 11:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516848#M87477</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-08-29T11:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516876#M87484</link>
      <description>&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://$SPLUNK_HOME/etc/apps/TA-HackerOne/bin/hacker_one_pull.sh]
index = main
interval = 180.0
sourcetype = h1:json
source = api_hackerone
disabled = false
# send_index_as_argument_for_path = false&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;props.conf &lt;/STRONG&gt;(&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;CURRENT time is the intended and desired behavior)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[h1:json]
CHARSET=UTF-8
DATETIME_CONFIG=CURRENT
INDEXED_EXTRACTIONS=json
KV_MODE=none
SHOULD_LINEMERGE=false
category=Structured
description=HackerOne JSON data via REST API
disabled=false
pulldown_type=true
LINE_BREAKER=([\r\n]+)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Sample data &lt;/STRONG&gt;(&lt;STRONG&gt;NOTE: &lt;/STRONG&gt;attributes.created_at is not the desired timestamp for _time, hence using CURRENT)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-bash-4.2$ pwd
/opt/splunk/etc/apps/TA-HackerOne/bin
-bash-4.2$ ./hacker_one_pull.sh
{
  "id": "49",
  "type": "report",
  "attributes": {
    "name": "Lorem Ipsum",
    "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
    "external_id": "aaa-123",
    "created_at": "2018-02-27T16:48:23.308Z"
  }
}
{
  "id": "20",
  "type": "report",
  "attributes": {
    "name": "Finibus Bonorum",
    "description": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.",
    "external_id": "aaa-726",
    "created_at": "2019-09-11T08:26:14.625Z"
  }
}
-bash-4.2$&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 29 Aug 2020 19:14:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516876#M87484</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2020-08-29T19:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516878#M87485</link>
      <description>&lt;P&gt;Your example did work for me so I guess maybe it's my script.&amp;nbsp; I adjusted my .conf regardless but still nothing.&amp;nbsp; No idea what the issue may be.&lt;/P&gt;&lt;P&gt;---REVISED ---&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://$SPLUNK_HOME/etc/apps/TA-HackerOne/bin/hacker_one_pull.sh]
disabled = false
index = test
interval = 180.0
sourcetype = h1:json&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[h1:json]
DATETIME_CONFIG=CURRENT
INDEXED_EXTRACTIONS=json
KV_MODE=none
LINE_BREAKER=([\r\n]+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data sample&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-bash-4.2$ pwd
/opt/splunk/etc/apps/TA-HackerOne/bin
-bash-4.2$ ./hacker_one_pull.sh
{
  "id": "49",
  "type": "report",
  "attributes": {
    "name": "Lorem Ipsum",
    "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
    "external_id": "aaa-123",
    "created_at": "2018-02-27T16:48:23.308Z"
  }
}
{
  "id": "20",
  "type": "report",
  "attributes": {
    "name": "Finibus Bonorum",
    "description": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.",
    "external_id": "aaa-726",
    "created_at": "2019-09-11T08:26:14.625Z"
  }
}
-bash-4.2$&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This shows up in _internal (but only once, never again)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;08-29-2020 20:01:04.689 +0000 INFO  ExecProcessor - New scheduled exec process: /opt/splunk/etc/apps/TA-HackerOne/bin/hacker_one_pull.sh&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 29 Aug 2020 20:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516878#M87485</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2020-08-29T20:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516885#M87486</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;can you try to change your props.conf to:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;[h1:json]
DATETIME_CONFIG =
INDEXED_EXTRACTIONS = json
KV_MODE = none
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
TIMESTAMP_FIELDS = attributes.created_at
TIME_FORMAT = %FT%T.%3Q%Z
disabled = false
pulldown_type = true&lt;/LI-CODE&gt;&lt;P&gt;Based on my test this should fix it (at least with your examples).&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Aug 2020 23:20:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516885#M87486</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-08-29T23:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516889#M87487</link>
      <description>&lt;P&gt;Thank you very much for all the suggestions and troubleshooting.&amp;nbsp; After getting the test script to work but mine failing, I concluded that the issue was with my script.&amp;nbsp; Breaking it down to the bare minimum commands to replicate the functionality in my script AND running it with the splunk binary (rather than just from the command line as the splunk user)&amp;nbsp; I realized that Splunk was experiencing some problems.&amp;nbsp; In my original script, I use the curl command but was using the silent flag (-s) so the errors themselves were being hidden from stdout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now testing it at its bare minimum, I saw Splunk throwing errors because it was unable to access (or couldn't find for some reason) the SSL CA cert path.&amp;nbsp; There were 2 solutions to this, either use the -k switch in my curl command, or provide the full path using --cacert.&amp;nbsp; I tested both and they both work but ended up using solution 2.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Testing using the splunk binary&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/opt/splunk/bin/splunk cmd ./json.sh&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Solution 1: (-k) non-ssl cert validation&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -sgk "https://api.website.com/rest_endpoint" -X GET -u "user:api_token" -H 'Accept: application/json'&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Solution 2: Provide the path to standard certs&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -sg --cacert /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem "https://api.website.com/rest_endpoint" -X GET -u "user:api_token" -H 'Accept: application/json'&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 30 Aug 2020 04:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516889#M87487</guid>
      <dc:creator>DEADBEEF</dc:creator>
      <dc:date>2020-08-30T04:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring outputs.conf for an "all in one" box</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516891#M87488</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;nice to hear that you solve your problem. As you said, the one must test all scripts with splunk cmd your script or splunk cmd python your script to ensure that those are working also when they are calling inside splunk! It’s not unusual that e.g. python scripts works in cmd line and fail when testing first time with splunk.&amp;nbsp;&lt;BR /&gt;Happy splunking !&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Sun, 30 Aug 2020 06:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configuring-outputs-conf-for-an-quot-all-in-one-quot-box/m-p/516891#M87488</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-08-30T06:38:57Z</dc:date>
    </item>
  </channel>
</rss>

