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>
After saving the dashboard, i reopend dashboard i am getting something else .
Please help !
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
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
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!
@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 .
may be There are invisible escape characters in the code .
remove the spaces between the lines and create a new dashboard with new name
Hi @naidusadanala,
thank you for the quick reply.
I have tried the same after removing the spaces but still getting the same error .