Issue with setting up destination for trigger to use

I’m trying to configure an alert to notify me by sending a message to an Amazon SNS topic, which then triggers a lambda. I created a new destination and entered the SNS ARN and the IAM ARN, when creating my trigger I add the action to use the new SNS destination, when I go back to the monitor in the ‘alerts’ section it shows that the state for that trigger is ‘error’.

I know error indicates ‘An error occurred while executing the trigger—usually the result of a a bad trigger or destination.’ based on the documentation, but I can’t tell which is the issue, is there a way to get more details on the error whether it was the trigger or the destination? I know the SNS is working because I’ve tested posting a message using the same IAM ARN I used to configure the destination. As for the trigger, I used the same trigger with a different action (webhook) and it works fine.

Hi @jberto78,

Currently we do not have a good way of allowing a user to diagnose what the error is on the UI. We are tracking this issue here: Add error messaging detail for Alerts in "Error" state · Issue #21 · opendistro-for-elasticsearch/alerting-kibana-plugin · GitHub

As for a workaround for now, you can query the .opendistro-alerting-alerts index and find the alert for that monitor/trigger to see the actual error message on the alert.

GET .opendistro-alerting-alerts/_search

There should be a error_message property that shows the current error and an alert_history property that shows the last 10 errors for this alert.


1 Like

Hi @dbbaughe,
Is there a list of services the IAM role being used would need to have in place to be able to post a message to the SNS topic? The IAM role I am using has the SNS service attached to it with the action ‘publish’. It also has the ElasticSearch service attached with the ESHttpGet, ESHttpPost and ESHttpPut actions. I wonder if I’m missing something on the IAM role not allowing it to post to the SNS from the open-distro alerting app.

There is an example of setting up the Amazon SNS destination here: