<?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: Why does my modular input Run() command generate thousands of events (rather than dozens)? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229130#M2945</link>
    <description>&lt;P&gt;Hi - Thanks for answer (I just saw this now 5-23).&lt;/P&gt;

&lt;P&gt;I did what you suggested but my app doesn't seem to be pulling any data as it stands right now (current version is &lt;A href="https://github.com/Qumulo/qumulo_splunk_app/commit/ab005cea165ede210575bee44e4564ad214f2e4a"&gt;here&lt;/A&gt; on GH).  Perhaps I need to go and rebuild this with latest python SDK for a modular input first...&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2016 22:28:34 GMT</pubDate>
    <dc:creator>michaelQumulo</dc:creator>
    <dc:date>2016-05-23T22:28:34Z</dc:date>
    <item>
      <title>Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229127#M2942</link>
      <description>&lt;P&gt;I have a question about some odd behavior I'm seeing in my Modular Input app; specifically:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://github.com/Qumulo/qumulo_splunk_app/blob/master/bin/qumulo.py#L296-L321" target="_blank"&gt;https://github.com/Qumulo/qumulo_splunk_app/blob/master/bin/qumulo.py#L296-L321&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;There is a bug here, but when I fix the bug, things don't work :).&lt;/P&gt;

&lt;P&gt;The bug is:  After I process the endpoint (can be one of iops, capacity or throughput) I call continue, which repeats the while True loop from the top.  So time.sleep(polling_interval) never gets called, and I end up creating thousands of events and thrashing our REST API where I should be creating only dozens of events.&lt;/P&gt;

&lt;P&gt;But when I remove the continue after endpoint handling, I get no events in Splunk at all, and I cannot understand why.  What's more:  if I place something simple like time.sleep(10) before I process any endpoints, I don't get any logged events either.&lt;/P&gt;

&lt;P&gt;So there's something in my module input run() function that I'm not understanding -- how it is invoked or what is permissible inside of the run() function.  I think it follows the python Twitter example structurally, but I'm not sure how run() is invoked, now often and so forth. &lt;/P&gt;

&lt;P&gt;Any ideas?  &lt;/P&gt;

&lt;P&gt;Thanks in advance - Michael&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229127#M2942</guid>
      <dc:creator>michaelQumulo</dc:creator>
      <dc:date>2020-09-29T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229128#M2943</link>
      <description>&lt;P&gt;Clarification:  I'm aware that the &lt;CODE&gt;continue&lt;/CODE&gt; call in each conditional case prevents the sleep from happening, so my &lt;CODE&gt;run()&lt;/CODE&gt; command just keeps executing, which creates thousands of events.  The weird parts are as follows:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;When I remove the &lt;CODE&gt;continue&lt;/CODE&gt; commands I get no events at all.&lt;/LI&gt;
&lt;LI&gt;In my log I am seeing two calls per interval for each endpoint type, rather than one.... and I can't see why.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks again - Michael&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 17:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229128#M2943</guid>
      <dc:creator>michaelQumulo</dc:creator>
      <dc:date>2016-05-02T17:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229129#M2944</link>
      <description>&lt;P&gt;In Splunk 6.x you don't need to control the interval settings. This is native functionality. Remove all reference to sleeps, configs for interval including cron. In "More Settings" of any data input is the Interval setting. It executes exactly as you are trying to program but controlled by the master Splunk process. Then on the modular input, just execute the of statements and let them complete. You'll be much happier you did&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 23:07:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229129#M2944</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2016-05-11T23:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229130#M2945</link>
      <description>&lt;P&gt;Hi - Thanks for answer (I just saw this now 5-23).&lt;/P&gt;

&lt;P&gt;I did what you suggested but my app doesn't seem to be pulling any data as it stands right now (current version is &lt;A href="https://github.com/Qumulo/qumulo_splunk_app/commit/ab005cea165ede210575bee44e4564ad214f2e4a"&gt;here&lt;/A&gt; on GH).  Perhaps I need to go and rebuild this with latest python SDK for a modular input first...&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 22:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229130#M2945</guid>
      <dc:creator>michaelQumulo</dc:creator>
      <dc:date>2016-05-23T22:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229131#M2946</link>
      <description>&lt;P&gt;If you can port it to our SDK that would be great and it should make your code cleaner / nicer, be easier for us to support you and remove a bunch of boilerplate code :-). I'll take a look at your code and see if I see anything funky.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 20:06:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229131#M2946</guid>
      <dc:creator>gblock_splunk</dc:creator>
      <dc:date>2016-05-24T20:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229132#M2947</link>
      <description>&lt;P&gt;Thanks @gblock -- I will update my app to use the Python SDK and update....&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 21:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229132#M2947</guid>
      <dc:creator>michaelQumulo</dc:creator>
      <dc:date>2016-05-25T21:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229133#M2948</link>
      <description>&lt;P&gt;Hi gblock -- I've updated our app to use latest python SDK, you can find it here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/3082/"&gt;https://splunkbase.splunk.com/app/3082/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I now have only one other problem:  The polling does not seem to work.  That is: it works the first time and it pulls again if I change config (like changing the polling interval for each of my 3 endpoints to 60 seconds) but never again after that.  Can you have a look?&lt;/P&gt;

&lt;P&gt;thanks!  Michael&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229133#M2948</guid>
      <dc:creator>michaelQumulo</dc:creator>
      <dc:date>2016-06-06T18:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my modular input Run() command generate thousands of events (rather than dozens)?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229134#M2949</link>
      <description>&lt;P&gt;Hi gblock -- I've updated our app to use latest python SDK, you can find it here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/3082/"&gt;https://splunkbase.splunk.com/app/3082/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I now have only one other problem:  The polling does not seem to work.  That is: it works the first time and it pulls again if I change config (like changing the polling interval for each of my 3 endpoints to 60 seconds) but never again after that.  Can you have a look?&lt;/P&gt;

&lt;P&gt;thanks!  Michael&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-does-my-modular-input-Run-command-generate-thousands-of/m-p/229134#M2949</guid>
      <dc:creator>michaelQumulo</dc:creator>
      <dc:date>2016-06-06T18:39:18Z</dc:date>
    </item>
  </channel>
</rss>

