Dashboards & Visualizations

How to highlight specific keywords from field and display on dashboard?

aravindpadmin
Explorer

Hi I have the Sample dashboard. Client need to get top 5 tweets related to applications where the specific application keywords needs to be highlighted. For example : TweetText is "what about the elderly & vulnerable, those that don't drive or do internet banking, those that rely on B…"

here "internet banking" needs to be highlighted with any colour. Here we need to check for lower(TweetText) contains keyword(lower(internet BanKing)). How can we highlight only the keyword, NOT the entire lines of data. Please advise.

alt text

Tags (1)
0 Karma
1 Solution

niketn
Legend

@aravindpadmin refer to one of my older answer on similar lines which highlights a selected text using SplunkJS to create Custom table renderer and using JavaScript to apply highlight color/style: https://answers.splunk.com/answers/636948/how-to-add-css-class-to-table-field-by-input-in-sp.html

You can extend the same for your use-case and highlight five different matches.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@aravindpadmin refer to one of my older answer on similar lines which highlights a selected text using SplunkJS to create Custom table renderer and using JavaScript to apply highlight color/style: https://answers.splunk.com/answers/636948/how-to-add-css-class-to-table-field-by-input-in-sp.html

You can extend the same for your use-case and highlight five different matches.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

aravindpadmin
Explorer

@niketnilay, thanks for your response. I am new to JavaScript. Would you please help me with JavaScript for my requirement. Thanks in advance.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...