Alerting

Slack Alert Customization

manish_singh_77
Builder

Hi Team,

How do we pass link result of splunk alerts in slack from splunk?

Labels (1)
Tags (1)
1 Solution

jkat54
SplunkTrust
SplunkTrust

jkat54
SplunkTrust
SplunkTrust
curl -X POST -H 'Content-type: application/json' --data '{"text":"Allow me to reintroduce myself!"}' YOUR_WEBHOOK_URL
0 Karma

manish_singh_77
Builder

@jkat54

How can we run this command from search head url from the search query?

0 Karma

jkat54
SplunkTrust
SplunkTrust

It's a Linux command you run from a command line shell.

0 Karma

manish_singh_77
Builder

@jkat54

I tried different slack channel that is using the same webhook url for testing purpose and there also we observed the delay in receiving alerts.

PFB error message that we see in the splunkd.log

ERROR SearchScheduler - Error in 'sendalert' command: Alert script returned error code 255., search='sendalert slack_webhook_alert results_file="/opt/splunk/var/run/splunk/dispatch/scheduler_bXNpbmdoQGFybG8uY29t_c3BsdW5rX2FwcF9qZW5raW5z_RMD55de36a8bbf79c022_at_1580289000_23596_B2217163-89B0-464E-965F-D5D289E35131/results.csv.gz" results_link="********/app/splunk_app_jenkins/@go?sid=scheduler_bXNpbmdoQGFybG8uY29t_c3BsdW5rX2FwcF9qZW5raW5z_RMD55de36a8bbf79c022_at_1580289000_23596_B2217163-89B0-464E-965F-D5D289E35131"'

0 Karma

jkat54
SplunkTrust
SplunkTrust

If you try the curl command... which is what slack says to do to test your webhook...:

It will display any errors such as a rate limit

0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...