Update README w/ Slack Integration Instructions
theomarkkuspaul opened this issue · 4 comments
Hey guys, really enjoying using this project.
Noticed you built a Slack integration in this PR: Add slack notification #21
It would be fantastic if the README details how I might be able to wire up Chaos Lambda running on my AWS account with my Slack. Any thoughts on how soon this can get done?
Hi @theomarkkuspaul , you have to create an Incoming Webhook in Slack as stated here: https://api.slack.com/incoming-webhooks
It gives you the URL to use in your chaos lambda configuration file. Specifically, you only need to "XXXXXXXXXX" part of the example URL in that page. After configured your Chaosfile.js, the app will take care of everything.
Does it answer your quesiton?
Hey @davinerd thanks for the reply. Yep, I have created the Slack webhook per the documentation.
I'm not sure exactly at this point how to configure my Chaosfile.json with the access key Slack has given me. Any steps on how I can achieve?
So Slack gave you something like https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
, am I correct? Is this the access key are you talking about?
If so, then take the XXXXXXXXXXXXXXXXXXXXXXXX
part and put that in the Chaosfile.json under the webhookId
key. Type the channel name you want to send the notification to under the channel
key.
That should do the trick.
Let me know if you encounter in any error.
I've found that I actually need to specify everything after the "/services/" portion inside the Chaosfile.json
"slackWebhook": [
{
"channel": "#channel",
"webhookId": "/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
}
Don't forget to build from source since this package hasn't been updated in npm. Slack integration is not in the latest tagged version.
https://www.npmjs.com/package/chaos-lambda