<?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 Problem with Java SDK Splunk query with more events returned. in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Problem-with-Java-SDK-Splunk-query-with-more-events-returned/m-p/304964#M3983</link>
    <description>&lt;P&gt;This is sent to devinfo also :&lt;/P&gt;

&lt;P&gt;We are using the Splunk javasdk to query out of a splunk &lt;BR /&gt;
alarms index to put alarm into and oracle table and to our &lt;BR /&gt;
alarm system. It runs every minute. &lt;/P&gt;

&lt;P&gt;The query is working 99% of the time, but we have some &lt;BR /&gt;
unusual minutes where the count of alarm events is usually &lt;BR /&gt;
high, as much as 5000 events, never close to the SDK limit of 50,000 . &lt;/P&gt;

&lt;P&gt;When this happend the query fails, and gives a BOGUS&lt;BR /&gt;
error message. &lt;/P&gt;

&lt;P&gt;2018-01-11T23:58:00.046Z, level=ERROR, host=njgpdwi02, ssys=ETL, tid=214, cat=npac.splunk_etl.ETL_common, gid=null, text="ETL_splunk_TX: Exception while processing splunk ETL: (Connection refused (Connection refused))." bldi=default-value-from-handler&lt;/P&gt;

&lt;P&gt;We know the "Connection refused" is bogus because curl REST command still connect to the same port&lt;BR /&gt;
AND moving the splunk query to a minute with fewer events, typically fewer than 20 and &lt;BR /&gt;
the splunk query connects and works. &lt;/P&gt;

&lt;P&gt;It seem clear the large number of events in some single minutes are the issue&lt;BR /&gt;
but we get a bogus message from the Splunk Java SDK.&lt;/P&gt;

&lt;P&gt;The Java SDK One shot query to splunk is set up like this;&lt;/P&gt;

&lt;P&gt;Args osArgs = new Args(); &lt;BR /&gt;
osArgs.put("earliest_time", sdf.format(ts1));  // get all alarms posted since the earliest time&lt;BR /&gt;
osArgs.put("count",fetchLimit); // set to zero to fetch all alarms (up to 50000 limit imposed by the API)&lt;BR /&gt;
osArgs.put("output_mode","xml");&lt;BR /&gt;
String osQuery = "search index=npac_alarm | reverse ";&lt;/P&gt;

&lt;P&gt;The count is set to 60, so bundles of 60 events should come.  &lt;/P&gt;

&lt;P&gt;While the count of events that trigger the problem is relatively low at a few&lt;BR /&gt;
thousand, some of these include java stack traces and can be quite&lt;BR /&gt;
large both individually, and in sum.&lt;/P&gt;

&lt;P&gt;We are looking for guidance to clear the problem. I read that &lt;BR /&gt;
using export queries from the SDK is preferable if there are a big number of&lt;BR /&gt;
events.  Could there be a buffer we are overflowing? Is count = 60 too low?&lt;/P&gt;

&lt;P&gt;Help appreciated.  We are a support customer but I have not opened a ticket&lt;BR /&gt;
my understadnig is writing to dev-info is the correct method. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:38:42 GMT</pubDate>
    <dc:creator>jimdiconectiv</dc:creator>
    <dc:date>2020-09-29T17:38:42Z</dc:date>
    <item>
      <title>Problem with Java SDK Splunk query with more events returned.</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Problem-with-Java-SDK-Splunk-query-with-more-events-returned/m-p/304964#M3983</link>
      <description>&lt;P&gt;This is sent to devinfo also :&lt;/P&gt;

&lt;P&gt;We are using the Splunk javasdk to query out of a splunk &lt;BR /&gt;
alarms index to put alarm into and oracle table and to our &lt;BR /&gt;
alarm system. It runs every minute. &lt;/P&gt;

&lt;P&gt;The query is working 99% of the time, but we have some &lt;BR /&gt;
unusual minutes where the count of alarm events is usually &lt;BR /&gt;
high, as much as 5000 events, never close to the SDK limit of 50,000 . &lt;/P&gt;

&lt;P&gt;When this happend the query fails, and gives a BOGUS&lt;BR /&gt;
error message. &lt;/P&gt;

&lt;P&gt;2018-01-11T23:58:00.046Z, level=ERROR, host=njgpdwi02, ssys=ETL, tid=214, cat=npac.splunk_etl.ETL_common, gid=null, text="ETL_splunk_TX: Exception while processing splunk ETL: (Connection refused (Connection refused))." bldi=default-value-from-handler&lt;/P&gt;

&lt;P&gt;We know the "Connection refused" is bogus because curl REST command still connect to the same port&lt;BR /&gt;
AND moving the splunk query to a minute with fewer events, typically fewer than 20 and &lt;BR /&gt;
the splunk query connects and works. &lt;/P&gt;

&lt;P&gt;It seem clear the large number of events in some single minutes are the issue&lt;BR /&gt;
but we get a bogus message from the Splunk Java SDK.&lt;/P&gt;

&lt;P&gt;The Java SDK One shot query to splunk is set up like this;&lt;/P&gt;

&lt;P&gt;Args osArgs = new Args(); &lt;BR /&gt;
osArgs.put("earliest_time", sdf.format(ts1));  // get all alarms posted since the earliest time&lt;BR /&gt;
osArgs.put("count",fetchLimit); // set to zero to fetch all alarms (up to 50000 limit imposed by the API)&lt;BR /&gt;
osArgs.put("output_mode","xml");&lt;BR /&gt;
String osQuery = "search index=npac_alarm | reverse ";&lt;/P&gt;

&lt;P&gt;The count is set to 60, so bundles of 60 events should come.  &lt;/P&gt;

&lt;P&gt;While the count of events that trigger the problem is relatively low at a few&lt;BR /&gt;
thousand, some of these include java stack traces and can be quite&lt;BR /&gt;
large both individually, and in sum.&lt;/P&gt;

&lt;P&gt;We are looking for guidance to clear the problem. I read that &lt;BR /&gt;
using export queries from the SDK is preferable if there are a big number of&lt;BR /&gt;
events.  Could there be a buffer we are overflowing? Is count = 60 too low?&lt;/P&gt;

&lt;P&gt;Help appreciated.  We are a support customer but I have not opened a ticket&lt;BR /&gt;
my understadnig is writing to dev-info is the correct method. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Problem-with-Java-SDK-Splunk-query-with-more-events-returned/m-p/304964#M3983</guid>
      <dc:creator>jimdiconectiv</dc:creator>
      <dc:date>2020-09-29T17:38:42Z</dc:date>
    </item>
  </channel>
</rss>

