<?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: Splunk errors generated alongside successful data import with input script in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526724#M88839</link>
    <description>If there haven’t any other instructions then you must read code to get hints. Based on those parameters, I first try with setup and after that with execute. But best option is read docs and/or code.&lt;BR /&gt;r. Ismo</description>
    <pubDate>Tue, 27 Oct 2020 21:12:17 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2020-10-27T21:12:17Z</dc:date>
    <item>
      <title>Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526277#M88790</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm getting the following error message from the splunk python code in admin.py (the trace is below in bold) every time my input script gets called. Despite the recurrent error the input script gets all the data imported successfully. I've checked inputs.conf many times and tried different parameters according to the spec to see if it made any difference but no. There are no errors in the script itself. There is no impact on the app functionality but this error pollutes the log which is the issue I'm trying to solve. Any clues what could trigger this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; File "/opt/splunk/lib/python3.7/site-packages/splunk/admin.py", line 137, in init&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode = ((len(sys.argv) &amp;amp;gt; 1) and sys.argv[1] in ARGS_LIST) and sys.argv[1] or usage()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; File "/opt/splunk/lib/python3.7/site-packages/splunk/admin.py", line 16, in usage&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise UsageException("Usage: %s [%s].&amp;nbsp; (Got: %s)" % (sys.argv[0], str.join(str(" | "), ARGS_LIST), sys.argv))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;splunk.admin.UsageException: Usage: /opt/splunk/etc/apps/myapp/bin/myscript.py [setup | execute | persistent].&amp;nbsp; (Got: ['/opt/splunk/etc/apps/myapp/bin/myscript.py'])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 19:13:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526277#M88790</guid>
      <dc:creator>ayuri</dc:creator>
      <dc:date>2020-10-23T19:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526377#M88797</link>
      <description>&lt;P&gt;From the first look of it:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;splunk.admin.UsageException: Usage: /&lt;EM&gt;opt/splunk/etc/apps/myapp/bin/myscript.py [setup | execute | persistent&lt;/EM&gt;].&amp;nbsp; (Got: ['/opt/splunk/etc/apps/myapp/bin/myscript.py']&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The usage of execution is throwing exception because script is not being passed one of 3 arguments:&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;setup, execute or persistent.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Try passing one as the argument and see if the error goes away.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 19:27:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526377#M88797</guid>
      <dc:creator>kbehl</dc:creator>
      <dc:date>2020-10-25T19:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526508#M88813</link>
      <description>&lt;P&gt;Yes, but it looks to me that the error message is internal to Splunk (from splunk/sdmin.py). The AppInspect report is clean. My script doesn't need/support any such command flags [setup | execute | persistent]. Or is it required to support these flags? I couldn't find it in the documentation..&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 18:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526508#M88813</guid>
      <dc:creator>ayuri</dc:creator>
      <dc:date>2020-10-26T18:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526665#M88825</link>
      <description>&lt;P&gt;Where can I find the spec for these command flags (setup | execute | persistent)? It looks like they have to be supported to avoid this error message in the log. I cannot find it in the documentation. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 15:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526665#M88825</guid>
      <dc:creator>ayuri</dc:creator>
      <dc:date>2020-10-27T15:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526678#M88828</link>
      <description>&lt;P&gt;If passing one of these flags, the error is gone but the session key cannot be retrieved anymore so can't get token and other parameters necessary for getting the data&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 16:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526678#M88828</guid>
      <dc:creator>ayuri</dc:creator>
      <dc:date>2020-10-27T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526679#M88829</link>
      <description>You could test it with command&lt;BR /&gt;splunk cmd python &amp;lt;path to your input&amp;gt;&lt;BR /&gt;It executes it as it has called as input.&lt;BR /&gt;r. Ismo</description>
      <pubDate>Tue, 27 Oct 2020 16:33:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526679#M88829</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-10-27T16:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526709#M88837</link>
      <description>&lt;P&gt;That was helpful, saves me a restart, thanks.&lt;/P&gt;&lt;P&gt;Where can I read about the "[setup | execute | persistent]" flags? I was not able to find it in the documentation.&lt;/P&gt;&lt;P&gt;When I provide one of those - the error is gone but I no longer can get the session key with sys.stdin.readline().strip()&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 19:41:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526709#M88837</guid>
      <dc:creator>ayuri</dc:creator>
      <dc:date>2020-10-27T19:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526724#M88839</link>
      <description>If there haven’t any other instructions then you must read code to get hints. Based on those parameters, I first try with setup and after that with execute. But best option is read docs and/or code.&lt;BR /&gt;r. Ismo</description>
      <pubDate>Tue, 27 Oct 2020 21:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526724#M88839</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-10-27T21:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk errors generated alongside successful data import with input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526951#M88878</link>
      <description>&lt;P&gt;Alright, that was a harmless (caught) exception in some legacy code that produced the SDK error.. would be a breeze to find it if running locally (no license though)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 18:57:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-errors-generated-alongside-successful-data-import-with/m-p/526951#M88878</guid>
      <dc:creator>ayuri</dc:creator>
      <dc:date>2020-10-28T18:57:29Z</dc:date>
    </item>
  </channel>
</rss>

