<?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: real-time search using python SDK export command in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/real-time-search-using-python-SDK-export-command/m-p/551910#M9850</link>
    <description>&lt;P&gt;I am facing a similar problem.&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 17:37:30 GMT</pubDate>
    <dc:creator>srijondas</dc:creator>
    <dc:date>2021-05-17T17:37:30Z</dc:date>
    <item>
      <title>real-time search using python SDK export command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/real-time-search-using-python-SDK-export-command/m-p/550652#M9849</link>
      <description>&lt;P&gt;so here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import splunklib.client as client
import splunklib.results as results

client.connect(**connection_args)
job_kwargs = {"search_mode": "realtime", "earliest_time": "rt", "latest_time": "rt"}
for item in service.jobs.export(query=my_query, **job_kwargs):
    if isinstance(item, results.Message):
        print(item.message)
    else:
        print(item)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I'm trying to run this code with a general query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;query="search index=main"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It’s working properly.&lt;BR /&gt;but if I’m trying with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;query="search `notable` | eval rule_name=if(isnull(rule_name),source,rule_name) | eval rule_title=if(isnull(rule_title),rule_name,rule_title) | `get_urgency` | `risk_correlation` | eval rule_description=if(isnull(rule_description),source,rule_description) | eval security_domain=if(isnull(security_domain),source,security_domain)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a lot of events that I cannot see in the regular search.&lt;BR /&gt;also, I get almost every multiple times with a little change (such as dest_ip=8.8.8.8 anddest_ip=8.8.8.9) and a part of them are even identical.&lt;/P&gt;&lt;P&gt;note when I’m trying to test it I found that I have on average 9 events in 5 min but when I’m using the real-time search I get almost 130 on average.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 14:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/real-time-search-using-python-SDK-export-command/m-p/550652#M9849</guid>
      <dc:creator>esharf</dc:creator>
      <dc:date>2021-05-06T14:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: real-time search using python SDK export command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/real-time-search-using-python-SDK-export-command/m-p/551910#M9850</link>
      <description>&lt;P&gt;I am facing a similar problem.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 17:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/real-time-search-using-python-SDK-export-command/m-p/551910#M9850</guid>
      <dc:creator>srijondas</dc:creator>
      <dc:date>2021-05-17T17:37:30Z</dc:date>
    </item>
  </channel>
</rss>

