Alerting

Does Splunk support sound alerts in Enterprise dashboards based on the threshold in the query?

maryamchar
Explorer

Hello, 

Does Splunk supports sound alerts in Enterprise dashboards based on the threshold in the query?

Ex. I have a query where it shows the (statues > 100) or (statues < 100).  If the (statues >= 100), i would like to get a sound alert. I'm displaying these statuses in Trellis Single Value. Please let me know if it's possible to get an alert once it reaches a certain threshold and how would you set it up in Splunk dashboard? Thank you!

Labels (3)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@maryamchar  - As @richgalloway  mentioned there is no native support but if you want to you can write a custom JavaScript function that can perform the task.

 

Part of your dashboard XML

        <single>
            <title>Active Users</title>
            <search>
                <query>
                   <your query>
                    | stats count
                </query>
                <done>
                   <set token="tkn_alert_me">$result.count$</set>
                </done>
            </search>
            <option name="field">count</option>
        </single>

 

Your JavaScript Code:

 

require([
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/searchmanager',
    'splunkjs/mvc/simplexml/ready!'
], function ($, mvc, SearchManager) {

    // Defining model tokens
    let submittedTokens = mvc.Components.getInstance('submitted');
    submittedTokens.on("change:tkn_alert_me", function(value){
           if(value>=100){
                  // follow this link to see how to play sound -  https://stackoverflow.com/questions/10105063/how-to-play-a-notification-sound-on-websites
            }
     });
});

 

If you are new to adding Javascript to the Splunk dashboard - https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-JavaScript-code-in-Splunk-Cloud... 

 

I hope this helps!!!  Kindly accept the answer it does.

richgalloway
SplunkTrust
SplunkTrust

Splunk dashboard do not have native support for sounds.

---
If this reply helps you, Karma would be appreciated.

maryamchar
Explorer

Is this something Splunk planning to add in the future? Dashboard sound alerts? Thank you!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I have no idea since I'm only a user, but I hope not.  I don't like noisy computers.

You can ask for sound support at https://ideas.splunk.com

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

October 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Splunk Education Goes to Washington | Splunk GovSummit 2024

If you’re in the Washington, D.C. area, this is your opportunity to take your career and Splunk skills to the ...