<?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 Search - Report on non-existing fields [API] in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Report-on-non-existing-fields-API/m-p/395573#M114868</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am interacting with splunk through the API (more specifically I use the search.py from the SDK).&lt;BR /&gt;
I have a set of rules that I would like to run. Those rules have different field names than the ones I use on my Splunk.&lt;BR /&gt;
For example one of the rules I have, searches if the dst_port="4242", but my parsing on my Splunk is made differently. I have named that specific field destination_port and not dst_port. The search is therefore failing and finds 0 results. But when running multiple rules it is impossible to understand if the search returns 0 results because the field does exist or because it simply did not found anything.&lt;/P&gt;

&lt;P&gt;I want to run multiple searches (around 200+), and force Splunk to indicate me if (for one specific search) it could not find any results BECAUSE the field(s) I am searching does not exist.&lt;/P&gt;

&lt;P&gt;This is an example of how i perform one simple search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search.py --verbose=1 --config=mySplunkrc.conf "search index=main host=debian"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;results preview='0'/&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This happens because my field is named Host and not host. Although not possible to understand if I found 0 because it could not find the field named "host".&lt;/P&gt;

&lt;P&gt;Do you have a solution ?&lt;/P&gt;

&lt;P&gt;Thank you for your time.&lt;BR /&gt;
SRJ&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:00:16 GMT</pubDate>
    <dc:creator>srj</dc:creator>
    <dc:date>2020-09-30T00:00:16Z</dc:date>
    <item>
      <title>Search - Report on non-existing fields [API]</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Report-on-non-existing-fields-API/m-p/395573#M114868</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am interacting with splunk through the API (more specifically I use the search.py from the SDK).&lt;BR /&gt;
I have a set of rules that I would like to run. Those rules have different field names than the ones I use on my Splunk.&lt;BR /&gt;
For example one of the rules I have, searches if the dst_port="4242", but my parsing on my Splunk is made differently. I have named that specific field destination_port and not dst_port. The search is therefore failing and finds 0 results. But when running multiple rules it is impossible to understand if the search returns 0 results because the field does exist or because it simply did not found anything.&lt;/P&gt;

&lt;P&gt;I want to run multiple searches (around 200+), and force Splunk to indicate me if (for one specific search) it could not find any results BECAUSE the field(s) I am searching does not exist.&lt;/P&gt;

&lt;P&gt;This is an example of how i perform one simple search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search.py --verbose=1 --config=mySplunkrc.conf "search index=main host=debian"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;results preview='0'/&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This happens because my field is named Host and not host. Although not possible to understand if I found 0 because it could not find the field named "host".&lt;/P&gt;

&lt;P&gt;Do you have a solution ?&lt;/P&gt;

&lt;P&gt;Thank you for your time.&lt;BR /&gt;
SRJ&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Report-on-non-existing-fields-API/m-p/395573#M114868</guid>
      <dc:creator>srj</dc:creator>
      <dc:date>2020-09-30T00:00:16Z</dc:date>
    </item>
  </channel>
</rss>

