Alerting

Error in 'sendalert' command: Alert script returned error code 2.

katshima
New Member

I am generating alarms by acquiring abnormal values for CPU usage of NW devices.
I would like to send these alarms via email or webhook, but I get the above error and cannot send them.

What is the cause?

Error in 'sendalert' command: Alert script returned error code 2.

Labels (2)
0 Karma

fredclown
Contributor

You can search the internal Splunk logs to see if there are any errors logged. If you run this what do you get?

index=_internal sendemail sourcetype!=splunkd_ui_access sourcetype!=splunkd_remote_searches ERROR

 

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...