<?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: In Splunk hec, what should you  check if you cannot search fields from http event collector in SHC? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/In-Splunk-hec-what-should-you-check-if-you-cannot-search-fields/m-p/396647#M70687</link>
    <description>&lt;P&gt;There are additional configuration that is needed to use &lt;CODE&gt;fields&lt;/CODE&gt; in some cases. The data is automatically indexed (without the need for props and transformations on the HF/peer), but to be able to utilize the data configuration is needed at the SHC.&lt;/P&gt;

&lt;P&gt;With a configuration that is incomplete it will be possible to view the field while searching, but not possible to search with the field specified. The following steps helped resolve the issue:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;First&lt;/STRONG&gt; check that the events actually are indexed: &lt;CODE&gt;|tstast count where index=* k8s_node="node01.domain.tld"&lt;/CODE&gt;. If count &amp;gt; 0 the field is indexed (and you have access to it). &lt;CODE&gt;search index=* k8s_node="node01.domain.tld"&lt;/CODE&gt; would still show 0 events.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Then&lt;/STRONG&gt; on the searchhead cluster you need to specify that the field you are looking for is an indexed field. This is done in &lt;CODE&gt;fields.conf&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[k8s_node]
INDEXED = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;If&lt;/STRONG&gt; you are using a shdeployer (or another app on the searchhead for configuration rather than &lt;CODE&gt;system&lt;/CODE&gt;) you must ensure that  &lt;CODE&gt;metadata/default.meta&lt;/CODE&gt; contains the following.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fields]
export = system
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Additional search time extraction will need to be specified in &lt;CODE&gt;props.conf&lt;/CODE&gt; with settings like &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; depending on your source/sourcetypes&lt;/P&gt;

&lt;P&gt;This will allow you to search for fields with &lt;CODE&gt;field=value&lt;/CODE&gt; rather than &lt;CODE&gt;field::value&lt;/CODE&gt; like described in &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.1/Data/IFXandHEC#Search_for_index-extracted_fields"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.1/Data/IFXandHEC#Search_for_index-extracted_fields&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2018 18:31:37 GMT</pubDate>
    <dc:creator>larshaugan</dc:creator>
    <dc:date>2018-06-19T18:31:37Z</dc:date>
    <item>
      <title>In Splunk hec, what should you  check if you cannot search fields from http event collector in SHC?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-Splunk-hec-what-should-you-check-if-you-cannot-search-fields/m-p/396646#M70686</link>
      <description>&lt;P&gt;With Splunk HEC it is possible to send a HTTP POST with Json payload to &lt;CODE&gt;services/collector/event&lt;/CODE&gt;. This supports the &lt;CODE&gt;fields&lt;/CODE&gt; Json key, that enables you to add additional data to an event that is not present in the _raw (or event) data.&lt;/P&gt;

&lt;P&gt;Given the following json payload you should be able to search &lt;CODE&gt;search index=* k8s_node="node01*"&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{ "event": "datadata", "fields": {"k8s_node":"node01.domain.tld", "k8s_namespace","namespacename"}}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However when searching for fields that are not present in the _raw data, the search will not give you a match, and you will not be able to match searches to the items in the &lt;CODE&gt;fields&lt;/CODE&gt; key.&lt;/P&gt;

&lt;P&gt;What could be done to resolve this?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 16:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-Splunk-hec-what-should-you-check-if-you-cannot-search-fields/m-p/396646#M70686</guid>
      <dc:creator>larshaugan</dc:creator>
      <dc:date>2018-06-19T16:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: In Splunk hec, what should you  check if you cannot search fields from http event collector in SHC?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-Splunk-hec-what-should-you-check-if-you-cannot-search-fields/m-p/396647#M70687</link>
      <description>&lt;P&gt;There are additional configuration that is needed to use &lt;CODE&gt;fields&lt;/CODE&gt; in some cases. The data is automatically indexed (without the need for props and transformations on the HF/peer), but to be able to utilize the data configuration is needed at the SHC.&lt;/P&gt;

&lt;P&gt;With a configuration that is incomplete it will be possible to view the field while searching, but not possible to search with the field specified. The following steps helped resolve the issue:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;First&lt;/STRONG&gt; check that the events actually are indexed: &lt;CODE&gt;|tstast count where index=* k8s_node="node01.domain.tld"&lt;/CODE&gt;. If count &amp;gt; 0 the field is indexed (and you have access to it). &lt;CODE&gt;search index=* k8s_node="node01.domain.tld"&lt;/CODE&gt; would still show 0 events.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Then&lt;/STRONG&gt; on the searchhead cluster you need to specify that the field you are looking for is an indexed field. This is done in &lt;CODE&gt;fields.conf&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[k8s_node]
INDEXED = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;If&lt;/STRONG&gt; you are using a shdeployer (or another app on the searchhead for configuration rather than &lt;CODE&gt;system&lt;/CODE&gt;) you must ensure that  &lt;CODE&gt;metadata/default.meta&lt;/CODE&gt; contains the following.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fields]
export = system
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Additional search time extraction will need to be specified in &lt;CODE&gt;props.conf&lt;/CODE&gt; with settings like &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; depending on your source/sourcetypes&lt;/P&gt;

&lt;P&gt;This will allow you to search for fields with &lt;CODE&gt;field=value&lt;/CODE&gt; rather than &lt;CODE&gt;field::value&lt;/CODE&gt; like described in &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.1/Data/IFXandHEC#Search_for_index-extracted_fields"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.1/Data/IFXandHEC#Search_for_index-extracted_fields&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 18:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-Splunk-hec-what-should-you-check-if-you-cannot-search-fields/m-p/396647#M70687</guid>
      <dc:creator>larshaugan</dc:creator>
      <dc:date>2018-06-19T18:31:37Z</dc:date>
    </item>
  </channel>
</rss>

