Splunk Search

Display static text in splunk dashbaord

freephoneid
Path Finder

Hi,

I've below dashboard xml that I'm using for my project:

<view autoCancelInterval="90" isVisible="true" objectMode="SimpleDashboard" onunloadCancelJobs="true" refresh="-1" template="dashboard.html">
  <label>test Dashboard - Contact: <a href="mailto:james_clinton@abc.com">James</a></label>
  <module name="AccountBar" layoutPanel="appHeader"/>
  <module name="AppBar" layoutPanel="navigationHeader"/>
  <module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="clearOnJobDispatch">False</param>
    <param name="maxSize">1</param>
  </module>
  <module name="TitleBar" layoutPanel="viewHeader">
  <param name="actionsMenuFilter">dashboard</param>
  </module>

 <module name="HiddenSearch" layoutPanel="panel_row1_col1" group="test555" autoRun="True">
<module name="TimeRangePicker">
  <param name="searchWhenChanged">True</param>
  <param name="selected">Last 24 hours</param>
  <module name="HiddenSavedSearch" autoRun="True">
    <param name="savedSearch">my_test</param>
    <module name="HiddenChartFormatter">
      <param name="chart">column</param>
      <param name="primaryAxisTitle.text">Time</param>
      <module name="FlashChart">
        <module name="ConvertToDrilldownSearch">
          <module name="ViewRedirector">
            <param name="viewTarget">flashtimeline</param>
          </module>
        </module>
      </module>
    </module>
  </module>
</module>  
</module>
</view>

I want to display static text in this dashboard say "Contact: James Clinton" in the right side or near the dashboard title. How can I do that?

I tried using

   <label>test Dashboard - Contact: <a href="mailto:james_clinton@abc.com">James</a></label>

But its not allowing me to save the XML & complains that the syntax is not valid. Can any one tell me how to put static text in the right side or left side on top?

Thanks

Tags (2)
0 Karma

freephoneid
Path Finder

Ok...I was able to add text below titlebar using following code:

  <module name="TitleBar" layoutPanel="viewHeader">
     <param name="actionsMenuFilter">dashboard</param>
  </module>

 <module name="StaticContentSample" layoutPanel="viewHeader">
    <param name="text"><![CDATA[
    Contact: <a href="mailto:abc@abc.com">James</a>
   ]]></param>
 </module>

But this contact info gets added below title bar. Is there any way to add this contact info on the same line as titlebar to the very right side???

Any help is much appreciated!

Thanks!

0 Karma

freephoneid
Path Finder

I looked at above url & tried adding below lines in my dashboard:

<module name="StaticContentSample" layoutpanel="mainSearchControls"> 
   <param name="text"><![CDATA[ <b>Title</b> ]]></param> 
</module>

But when I tried to save the xml, its giving error:

Exception: Splunk cannot load the specified view because a layoutPanel is not defined for module StaticContentSample_0_0_0

Any clue?

Thanks!

0 Karma

Takajian
Builder

I think you can refer to other answer as bellow. You can put static html content in advanced dashboard view. Hope this help.

http://splunk-base.splunk.com/answers/25329/custom-dashboards-formatting-html-text-static-content-in...

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...