<?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 Splunk dynamically extract JSON Key names while joining the event  with other sourcelogs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19104#M2879</link>
    <description>&lt;P&gt;It could be an option too... I have to test it.&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2013 17:35:52 GMT</pubDate>
    <dc:creator>lpolo</dc:creator>
    <dc:date>2013-05-09T17:35:52Z</dc:date>
    <item>
      <title>Can Splunk dynamically extract JSON Key names while joining the event  with other sourcelogs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19101#M2876</link>
      <description>&lt;P&gt;The following query is able to join two source logs where one of the source logs is in json format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="request" AND application=vsp NOT (Agent.007) key_name1 )
 OR
(sourcetype="response" key_name2)
| spath
| spath path=your_json_path output=your_output_key_name1
| spath path=your_json_path output=your_output_key_name2
| spath path=your_json_path output=your_output_key_name3
...
| spath path=your_json_path output=your_output_key_name4
stats
 first(your_output_key_name1) as your_output_key_name1
 first(your_output_key_name2) as your_output_key_name2
 first(your_output_key_name3) as your_output_key_name3
 first(your_output_key_name4) as your_output_key_name4
 first(key_name1) as key1
 list(key_name2) as key2 
 dc(sourcetype) as dc by id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;:&lt;BR /&gt;
JSon path could vary. Therefore, output variables too. Is there a way in Splunk that these could be discovered dynamically?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Lp&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 17:19:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19101#M2876</guid>
      <dc:creator>lpolo</dc:creator>
      <dc:date>2013-04-29T17:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk dynamically extract JSON Key names while joining the event  with other sourcelogs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19102#M2877</link>
      <description>&lt;P&gt;This query works: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype="request")//sourcelog. Key=value pair format.
 OR
(sourcetype="json_response")//source og. json format.
  |spath  //spath command in auto-extract mode. 
  |stats list(*) as * by id //join source log by id.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I am not source if it is limited by the way spath is ran without arguments. As documented:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;When spath is ran with no path argument, spath runs in "auto-extract" mode, where it finds and extracts all the fields from the first 5000 characters in the input field (which defaults to _raw if another input source isn't specified).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 May 2013 12:37:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19102#M2877</guid>
      <dc:creator>lpolo</dc:creator>
      <dc:date>2013-05-09T12:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk dynamically extract JSON Key names while joining the event  with other sourcelogs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19103#M2878</link>
      <description>&lt;P&gt;Have you considered using the "KV_MODE" parameter in your props.conf for this sourcetype? Check it out at &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2013 13:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19103#M2878</guid>
      <dc:creator>rgcurry</dc:creator>
      <dc:date>2013-05-09T13:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk dynamically extract JSON Key names while joining the event  with other sourcelogs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19104#M2879</link>
      <description>&lt;P&gt;It could be an option too... I have to test it.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2013 17:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Splunk-dynamically-extract-JSON-Key-names-while-joining-the/m-p/19104#M2879</guid>
      <dc:creator>lpolo</dc:creator>
      <dc:date>2013-05-09T17:35:52Z</dc:date>
    </item>
  </channel>
</rss>

