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:[email protected]">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:[email protected]">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:[email protected]">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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...