<?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: Can I use kv_mode = auto AND kv_mode = XML for sourcetype? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-kv-mode-auto-AND-kv-mode-XML-for-sourcetype/m-p/129622#M35270</link>
    <description>&lt;P&gt;If you want to use Splunk's automatic extraction capabilities, you have to pick one or the other. But - you could split your data into two sourcetypes. For example, instead of &lt;CODE&gt;mysourcetype&lt;/CODE&gt;, use &lt;CODE&gt;mysourcetype-XML&lt;/CODE&gt; and &lt;CODE&gt;mysourcetype-KV&lt;/CODE&gt;. Then your searches could look for &lt;CODE&gt;sourcetype=mysourcetype*&lt;/CODE&gt; to get both types of data.&lt;/P&gt;

&lt;P&gt;Generally, a sourcetype contains data that is syntactically homogeneous, as much as possible.&lt;/P&gt;

&lt;P&gt;Another alternative is to use the &lt;CODE&gt;xmlkv&lt;/CODE&gt; command to parse the XML fields during execution of a particular search.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2014 20:41:09 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2014-01-29T20:41:09Z</dc:date>
    <item>
      <title>Can I use kv_mode = auto AND kv_mode = XML for sourcetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-kv-mode-auto-AND-kv-mode-XML-for-sourcetype/m-p/129621#M35269</link>
      <description>&lt;P&gt;I have an application sourcetype that is a mix of normal informational data and also houses a subset of web requests and web responses all in XML format.&lt;/P&gt;

&lt;P&gt;I would like to present the XML data as a searchable element, i.e, account=1234, while at the same time allowing the current key/value pairs to be searched.&lt;/P&gt;

&lt;P&gt;As I read the docs, kv_mode is basically all or nothing.  In that, it's one mode only.&lt;/P&gt;

&lt;P&gt;How would I go about capturing both field elements from my logs using the splunk field identification process and not having to write thousands of extract statements?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 17:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-kv-mode-auto-AND-kv-mode-XML-for-sourcetype/m-p/129621#M35269</guid>
      <dc:creator>tyronetv</dc:creator>
      <dc:date>2014-01-29T17:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use kv_mode = auto AND kv_mode = XML for sourcetype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-kv-mode-auto-AND-kv-mode-XML-for-sourcetype/m-p/129622#M35270</link>
      <description>&lt;P&gt;If you want to use Splunk's automatic extraction capabilities, you have to pick one or the other. But - you could split your data into two sourcetypes. For example, instead of &lt;CODE&gt;mysourcetype&lt;/CODE&gt;, use &lt;CODE&gt;mysourcetype-XML&lt;/CODE&gt; and &lt;CODE&gt;mysourcetype-KV&lt;/CODE&gt;. Then your searches could look for &lt;CODE&gt;sourcetype=mysourcetype*&lt;/CODE&gt; to get both types of data.&lt;/P&gt;

&lt;P&gt;Generally, a sourcetype contains data that is syntactically homogeneous, as much as possible.&lt;/P&gt;

&lt;P&gt;Another alternative is to use the &lt;CODE&gt;xmlkv&lt;/CODE&gt; command to parse the XML fields during execution of a particular search.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 20:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-kv-mode-auto-AND-kv-mode-XML-for-sourcetype/m-p/129622#M35270</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-29T20:41:09Z</dc:date>
    </item>
  </channel>
</rss>

