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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...