Alerting

How can i throw an alert message thorugh custom javascript ?

rakesh_498115
Motivator

Hi.

I need through a alert message .if the search query of the form yields zero results ..how can i do that with the custom java script function. i have seen documentation about custom.js but couldn't get my head around..

pls help

Tags (1)
0 Karma

jonuwz
Influencer

See this :

Which is a response your question

http://splunk-base.splunk.com/answers/70402/can-we-disable-the-inspect-link-from-the-search-results

Alter option 3 to create the alert.

Drainy
Champion

If you couldn't get your head around it then you should probably consider this out of scope for the time being until you're more comfortable with javascript. Your comment seems to suggest that in every case its user error but it would seem to me that it could just be that their search terms don't return any results, as expected. Personally I'd just keep the behaviour that Splunk already has, its fairly clear when no results are returned

0 Karma

rakesh_498115
Motivator

No..say i have form . and the form searh doesnt return me any results..in tat case can i have provision to show a alert box which is available in javascript to show the user "No results found .please use proper input" message..

piebob
Splunk Employee
Splunk Employee

please be more clear. what are you trying to do here? run a script when an alert occurs in splunk?

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...