elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Alert to multiple sns topics

Open FerranMarin opened this issue 7 years ago • 3 comments

I am trying to set up a rule to publish to multiple sns topics. But I am not getting the configuration right.

I know I have the aws permissions right, because I can publish to any of the two topics, but I cannot do it with both. What I tried so far is:

alert:
- "sns"

sns:
sns_topic_arn: ["arn:aws-topic1", "arn:aws-topic2"] `
alert:
- "sns"
- "sns2"

sns:
sns_topic_arn: "arn:aws-topic1"
sns2:
sns_topic_arn: "arn:aws-topic2"`

And many other ways, but none seam to work. Is there anyway to setup what I want without creating multiple rules for the same thing?

FerranMarin avatar Jan 29 '19 16:01 FerranMarin

ElastAlert documentation does not really mention the ability to specify multiple topics. If you look at the code you can see what you need to check: boto3 documentation. It's not an option, you need to implement this to the SNS check, but it shouldn't be hard.

Salaander avatar Jan 29 '19 20:01 Salaander

You can set up multiple copies of an alerter by inlining the configurations

alert:
 - sns:
      sns_topic_arn: "aws-topic1"
 - sns:
      sns_topic_arn: "aws-topic2"
default_sns_settings: xyz

Qmando avatar Jan 29 '19 20:01 Qmando

Thanks for the help, I missed the : after sns. It's working just fine now! :D

FerranMarin avatar Jan 30 '19 14:01 FerranMarin