What is tooltip?
A tooltip is a graphical user interface (GUI) element used in conjunction with the cursor or mouse pointer. It is used to display information about an item without needing to click on it. A tooltip is also known as a hint, infotip or screentip. In blog we will see how to add tooltip to simple xml tables in splunk.

Steps for adding tooltip to simple xml tables –

Step 1 :  Adding custom JavaScript and CSS.

  • Add the following code in dashboard or form to process additional javascript and CSS.
  • < form stylesheet=”app_crash.css” script=”app_crash.js” >
  • The .css and .js files should reside in SPLUNK_HOME/etc/apps/your_app/appserver/static

Step 2 : Giving your table an ID.

  • Create a table in Simple XML and give it a HTML ID, which will be added in our Javascript file.
  • eg : < row > < table id=”tblCrashReport” >

Step 3 : Writing a Javascript code.

    • First we need to add our table id to javascript file.
    • Then add this js code.

    • Code :

  • Next, we code up the cell renderer.
  • Code :

Step 4 : Overriding CSS.

  • Then we override the Bootstrap CSS. Here is what I added to my .css file to make the tooltip a little easier for me to read
  • CSS Code :

Step 5 : Restart Splunk.

  • Restart the splunk , so that changes take place.

Final Result :

If you are still facing issue regarding add tooltip to simple xml in splunk Feel free to Ask Doubts in the Comment Box Below and Don’t Forget to Follow us on 👍 Social Networks, happy Splunking >😉