Dashboards & Visualizations

Splunk dashboard: XML dashboard shows up as "loading" with text at bottom of screen

kannu
Communicator

Hello splunkers,

I have came across a different splunk behavior :
when i am creating the dashboard i have written simple xml like below:

<dashboard>
  <label>manish_testing2</label>

  <row>
    <panel>
      <html>
        <head>
          </head>
        <body>
          <p>hello manish</p>

        </body>
             </html>

    </panel>    
    </row>
</dashboard>

alt text

After saving the dashboard, i reopend dashboard i am getting something else .

alt text

Please help !

0 Karma
1 Solution

Elsurion
Communicator

Hmmm, looks like you try to readd a head tag, which will be filled by splunk with that:

<label>manish_testing2<\/label>\n        <row>\n          <panel>\n            <html>\n              <head>
        <meta name="referrer" content="never" />
        <meta name="referrer" content="no-referrer" />

          <script>
                window._splunk_metrics_events = {
                   push : function() {},
                   active: false,
                   }
          </script>
    \n                <\/head>\n              <body>\n   

Unless you have to rewrite head and body think it over again and just remove them.
It will work that way as well:

<html>
<p>hello manish</p>
</html>

You don't have to create a whole html page, the needed tags are enough, splunk will do the rest for you.
Also in the simple_xml_examples is a html example included.
HTML Doc

View solution in original post

0 Karma

Elsurion
Communicator

Hmmm, looks like you try to readd a head tag, which will be filled by splunk with that:

<label>manish_testing2<\/label>\n        <row>\n          <panel>\n            <html>\n              <head>
        <meta name="referrer" content="never" />
        <meta name="referrer" content="no-referrer" />

          <script>
                window._splunk_metrics_events = {
                   push : function() {},
                   active: false,
                   }
          </script>
    \n                <\/head>\n              <body>\n   

Unless you have to rewrite head and body think it over again and just remove them.
It will work that way as well:

<html>
<p>hello manish</p>
</html>

You don't have to create a whole html page, the needed tags are enough, splunk will do the rest for you.
Also in the simple_xml_examples is a html example included.
HTML Doc

0 Karma

mayurr98
Super Champion

hey @kannu

It might be Splunk problem cause I tried the code its working fine at my end
go to dashboard >>createnewdashboard and in the source code copy below code and try again!

 <dashboard>
       <label>manish_testing2</label>
       <row>
         <panel>
           <html>
             <head>
               </head>
             <body>
               <p>hello manish</p>
             </body>
                  </html>
         </panel>    
         </row>
     </dashboard>

try doing http://splunksh/en-US/debug/refresh
and restarting splunk

let me know if this helps you!

0 Karma

kannu
Communicator

@mayurr98

Thank for your reply ,

Actually issue will be seen when save the dashboard close your splunk browser window re open the splunk got to dashboard click the dashboard again which you have saved . You will be able to see that error
and issue is resolved actually as mentioned by @Elsurion .

0 Karma

naidusadanala
Communicator

may be There are invisible escape characters in the code .

remove the spaces between the lines and create a new dashboard with new name

0 Karma

kannu
Communicator

Hi @naidusadanala,
thank you for the quick reply.

I have tried the same after removing the spaces but still getting the same error .

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...