<?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: Expand json messages by default in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67702#M13680</link>
    <description>&lt;P&gt;Is there a way to apply this script to a specific app instead of on a global level?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Dec 2018 14:25:55 GMT</pubDate>
    <dc:creator>andrewzuehlke</dc:creator>
    <dc:date>2018-12-07T14:25:55Z</dc:date>
    <item>
      <title>Expand json messages by default?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67691#M13669</link>
      <description>&lt;P&gt;We have json data being fed into splunk. How can I instruct Splunk to show me the JSON object expanded by default. If default expansion is not possible can I query such that the results are expanded. Right now they are collapsed and I have to click to get to the Json fields I want&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 15:24:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67691#M13669</guid>
      <dc:creator>amanteja</dc:creator>
      <dc:date>2022-11-08T15:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67692#M13670</link>
      <description>&lt;P&gt;Any way to do this? Could someone please clarify?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 03:12:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67692#M13670</guid>
      <dc:creator>amanteja</dc:creator>
      <dc:date>2013-09-20T03:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67693#M13671</link>
      <description>&lt;P&gt;Anyone ever solve this?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 16:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67693#M13671</guid>
      <dc:creator>brentryan</dc:creator>
      <dc:date>2013-12-16T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67694#M13672</link>
      <description>&lt;P&gt;You can use "spath" command to extract/expand all the fields in the json data. "index=xxxx sourcetype=yyyyy| spath"&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 18:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67694#M13672</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-16T18:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67695#M13673</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;function autoExpand(){
    //console.log("autoExpand started");
    $(document).ready(function() {
        $(".Prop &amp;gt; a.showinline").each(function() {
            if($(this).html() == '[+]') {
                $(this)[0].click();
            }
        });
    });
    //console.log("autoExpand complete");
}

// select the target node
var target = document.body;

// create an observer instance
var observer = new MutationObserver(function(mutations) {
    autoExpand();
});

// configuration of the observer:
var config = { attributes: true, childList: true, characterData: true, subtree:true};

// pass in the target node, as well as the observer options
observer.observe(target, config);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Dec 2013 03:45:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67695#M13673</guid>
      <dc:creator>brentryan</dc:creator>
      <dc:date>2013-12-17T03:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67696#M13674</link>
      <description>&lt;P&gt;spath doesn't work for this.  I just want to be able to view the splunk results from my queries and I don't want to click on [+] sign for every json object/array within my log just to see what's in it.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 03:55:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67696#M13674</guid>
      <dc:creator>brentryan</dc:creator>
      <dc:date>2013-12-17T03:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67697#M13675</link>
      <description>&lt;P&gt;Thank you brentryan.  We are on 6.x and having this issue with second level nested json keys.  We did contact Splunk support, who pointed us here but could not instruct where to place this js.  We do have a feature request in now (SPL-142795).&lt;/P&gt;

&lt;P&gt;Meanwhile, for newer versions (we are on 6.x) the code below works when placed into /opt/splunk/share/splunk/search_mrsparkle/templates/pages/base.html&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;script&amp;gt;
 function autoExpand(){
     //console.log("autoExpand started");
     $(document).ready(function() {
         $(".jsexpands").each(function() {
             if($(this).html() == '[+]') {
                 $(this)[0].click();
             }
         });
     });
     setTimeout(function(){
        $('.modalize-table-overlay').click();
      }, 500);
     //console.log("autoExpand complete");
 }
// select the target node
 var target = document.body;

 // create an observer instance
 var observer = new MutationObserver(function(mutations) {
     autoExpand();
 });

 // configuration of the observer:
 var config = { attributes: true, childList: true, characterData: true, subtree:true};

 // pass in the target node, as well as the observer options
 observer.observe(target, config);
&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Jun 2017 14:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67697#M13675</guid>
      <dc:creator>rcordova_resona</dc:creator>
      <dc:date>2017-06-30T14:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67698#M13676</link>
      <description>&lt;P&gt;^ this worked for me. thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 18:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67698#M13676</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2017-07-26T18:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67699#M13677</link>
      <description>&lt;P&gt;also note, if you want to expand json data in dashboards you will need to add this to &lt;CODE&gt;/opt/splunk/share/splunk/search_mrsparkle/templates/pages/dashboard.html&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 18:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67699#M13677</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2017-07-26T18:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67700#M13678</link>
      <description>&lt;P&gt;Breaks in table view though (closes a table you've expanded)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 00:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67700#M13678</guid>
      <dc:creator>stevesmoot</dc:creator>
      <dc:date>2018-03-21T00:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67701#M13679</link>
      <description>&lt;P&gt;Checking if [+] was found fixes the table view issue:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;script&amp;gt;
   function autoExpand(){
       // console.log("autoExpand started");                                                                                                                  
       var found = false;
       $(document).ready(function() {
           $(".jsexpands").each(function() {
               if($(this).html() == '[+]') {
                   found=true;
                   $(this)[0].click();
               }
           });
       });

       if (found) {setTimeout(function(){         $('.modalize-table-overlay').click();       }, 500);}
       //console.log("autoExpand complete");                                                                                                                  
   }
  // select the target node                                                                                                                                   
  var target = document.body;

  // create an observer instance                                                                                                                              
  var observer = new MutationObserver(function(mutations) {
      autoExpand();
  });

  // configuration of the observer:                                                                                                                           
  var config = { attributes: true, childList: true, characterData: true, subtree:true};

  // pass in the target node, as well as the observer options                                                                                                 
  observer.observe(target, config);
&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Mar 2018 18:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67701#M13679</guid>
      <dc:creator>stevesmoot</dc:creator>
      <dc:date>2018-03-23T18:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67702#M13680</link>
      <description>&lt;P&gt;Is there a way to apply this script to a specific app instead of on a global level?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 14:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67702#M13680</guid>
      <dc:creator>andrewzuehlke</dc:creator>
      <dc:date>2018-12-07T14:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67703#M13681</link>
      <description>&lt;P&gt;As a user without admin access, I settled on this client-only solution. Create a bookmarklet with this javascript (might need tweaking of the class in the future, but you can inspect the plus sign to see what it should be):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;javascript:document.querySelectorAll('a.jsexpands').forEach(function(expander) {expander.click();});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="https://www.evernote.com/l/AUHzC2xE0qVMpLe63QcNNXEIAmbWM8eoov4" alt="chrome dev tools focused on the plus sign" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 15:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67703#M13681</guid>
      <dc:creator>patkujawa_wf</dc:creator>
      <dc:date>2018-12-14T15:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67704#M13682</link>
      <description>&lt;P&gt;After opening a case with Splunk to find a method that will work without changing a Global setting, we settled on using this option; thanks! We made a slight modification to your JavaScript to account for multiple levels of JSON; if you are interested, the code is:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;javascript:for(i=0;i&amp;lt;=3;i=i+1){document.querySelectorAll('a.jsexpands').forEach(function(expander) {expander.click();});}&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 13:09:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67704#M13682</guid>
      <dc:creator>andrewzuehlke</dc:creator>
      <dc:date>2019-02-13T13:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67705#M13683</link>
      <description>&lt;P&gt;At the top of your search results are field names, above the &lt;CODE&gt;Time&lt;/CODE&gt; field name is a paintbrush with the word &lt;CODE&gt;Format&lt;/CODE&gt; next to it.  Click on this and select &lt;CODE&gt;All lines&lt;/CODE&gt; for the &lt;CODE&gt;Max Lines&lt;/CODE&gt; setting and &lt;CODE&gt;Full&lt;/CODE&gt; for the &lt;CODE&gt;Click Selection&lt;/CODE&gt; setting.  Enjoy.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 22:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67705#M13683</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-06T22:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67706#M13684</link>
      <description>&lt;P&gt;Yes, just upload it is the /appserver/static folder of your app as a *.js file after having removed '&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 21:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67706#M13684</guid>
      <dc:creator>D2SI</dc:creator>
      <dc:date>2019-07-17T21:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67707#M13685</link>
      <description>&lt;P&gt;VERY COOL!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 23:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/67707#M13685</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-17T23:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/620009#M106869</link>
      <description>&lt;P&gt;This is awesome. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 00:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/620009#M106869</guid>
      <dc:creator>emceeMC</dc:creator>
      <dc:date>2022-11-08T00:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/622643#M107168</link>
      <description>&lt;P&gt;I tried on version 8.2.6.1 and it has no effect on json events. They keep being collapsed.&lt;/P&gt;&lt;P&gt;I am searching for a global way either, but cannot find any documentation.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 14:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/622643#M107168</guid>
      <dc:creator>rokxer</dc:creator>
      <dc:date>2022-11-30T14:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expand json messages by default</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/671168#M112514</link>
      <description>&lt;P&gt;Did anyone find solution for this ? The mentioned solutions doesnt seem to work&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 17:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Expand-json-messages-by-default/m-p/671168#M112514</guid>
      <dc:creator>SrividhyaB</dc:creator>
      <dc:date>2023-12-07T17:26:12Z</dc:date>
    </item>
  </channel>
</rss>

