<?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: Setup.xml handle save (POST) to a scripted input error in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475382#M81606</link>
    <description>&lt;P&gt;@manishmenon86 &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;setup.xml&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
  &amp;lt;block title="My Scripted Input" endpoint="data/inputs/script" entity=".%252Fbin%252Fmyscript.sh"&amp;gt;
    &amp;lt;input field="interval"&amp;gt;
      &amp;lt;label&amp;gt;Polling Interval (sec)&amp;lt;/label&amp;gt;
      &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/block&amp;gt;
&amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://./bin/myscript.sh]
interval = 60
sourcetype = customsourcetype
source = customsource
disabled = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;myscript.sh&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
echo "Yay! You called me!"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Apr 2020 06:47:28 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2020-04-14T06:47:28Z</dc:date>
    <item>
      <title>Setup.xml handle save (POST) to a scripted input error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475381#M81605</link>
      <description>&lt;P&gt;So here are the details. I have an app called myapp. &lt;BR /&gt;
under myapp/default I have a setup.xml defined like this&lt;BR /&gt;
    &lt;SETUP&gt;&lt;/SETUP&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;!-- Note that the path to the script uses URI encoding --&amp;gt;
  &amp;lt;block title="Enable a scripted input"
         endpoint="data/inputs/script"
         entity="%24SPLUNK_HOME%252Fetc%252Fapps%252Fmyapp%252Fbin%252Fmyscript.sh"&amp;gt;
    &amp;lt;text&amp;gt;
      &amp;lt;i&amp;gt;Specify the configuration for a single setting in a stanza.&amp;lt;/i&amp;gt;
    &amp;lt;/text&amp;gt;

    &amp;lt;input field="interval"&amp;gt;
      &amp;lt;label&amp;gt;Specify the interval for [$name$] &amp;lt;/label&amp;gt;
      &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
    &amp;lt;/input&amp;gt;

  &amp;lt;/block&amp;gt;

&amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have myscript.sh under myapp/bin&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
echo "Yay! You called me!"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now when I navigate to the app, the setup page comes up. I update the interval and click save and get the following error&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Encountered the following error while trying to update: Cannot find item for POST arg_name="/data/inputs/script/%24SPLUNK_HOME%252Fetc%252Fapps%252Fmyapp%252Fbin%252Fmyscript.sh/interval"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have checked and the endpoint&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://localhost:8089/servicesNS/nobody/myapp/data/inputs/script/%24SPLUNK_HOME%252Fetc%252Fapps%252Fmyapp%252Fbin%252Fmyscript.sh" target="test_blank"&gt;https://localhost:8089/servicesNS/nobody/myapp/data/inputs/script/%24SPLUNK_HOME%252Fetc%252Fapps%252Fmyapp%252Fbin%252Fmyscript.sh&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;exists.&lt;/P&gt;

&lt;P&gt;Not sure yet what is going on? Help please.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 02:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475381#M81605</guid>
      <dc:creator>manishmenon86</dc:creator>
      <dc:date>2020-04-13T02:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Setup.xml handle save (POST) to a scripted input error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475382#M81606</link>
      <description>&lt;P&gt;@manishmenon86 &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;setup.xml&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
  &amp;lt;block title="My Scripted Input" endpoint="data/inputs/script" entity=".%252Fbin%252Fmyscript.sh"&amp;gt;
    &amp;lt;input field="interval"&amp;gt;
      &amp;lt;label&amp;gt;Polling Interval (sec)&amp;lt;/label&amp;gt;
      &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/block&amp;gt;
&amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://./bin/myscript.sh]
interval = 60
sourcetype = customsourcetype
source = customsource
disabled = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;myscript.sh&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
echo "Yay! You called me!"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Apr 2020 06:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475382#M81606</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-04-14T06:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Setup.xml handle save (POST) to a scripted input error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475383#M81607</link>
      <description>&lt;P&gt;Thank you so much. It worked. What needs to be done to ask the good folks at Splunk to update their documentation?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 01:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Setup-xml-handle-save-POST-to-a-scripted-input-error/m-p/475383#M81607</guid>
      <dc:creator>manishmenon86</dc:creator>
      <dc:date>2020-04-15T01:52:54Z</dc:date>
    </item>
  </channel>
</rss>

