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.
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