cloud-event 1.1.2
by Serious Business
Subscribe to Cloud Events webhook subscriptions (such as from Azure EventGrid) and report them to a chat room.
README
Subscribe to events in your cloud infrastructure such as deployment slot failover!
It's helpful to know when important events happen in your cloud infrastructure. The cloud-event
skill can help. It allows you to subscribe to cloud events and report them into chat. It is capable of supporting events in all cloud providers, but currently only has built in support for Azure App Service events.
For example, suppose you use Blue Green deployments using Slots in Azure. You can subscribe to slot swaps to know when your deployments succeed or fail.
Subscribing to events is pretty easy. I posted a video walkthrough on YouTube or you can follow the instructions below.
- First, install and save the skill!
- Then, attach the skill to a chat channel. For example, in our
#ops
room I ran the command:@abbot attach cloud-event
. - When you attach the skill, it'll give you a URL to grab the HTTP Trigger URL. You'll need this in a moment.
- Go to Azure Event Grid Subscriptions in the Azure Portal and create a new subscription.
- For the "Event Schema" choose "Cloud Event Schema 1.0".
- For the "Topic Types" choose "App Services."
- For "Endpoint Type" choose "Web Hook" and supply the HTTP Trigger URL for the skill you created when you attached the skill.
And that's it! Now when the events you subscribed to occur, you'll get a notification in chat.
This skill supports the Cloud Events WebHook Spec v1.0. for subscribing to cloud events so it can be adapted to any cloud hosting provider. Over time I plan to add support for all kinds of events.
Usage
Run @abbot attach cloud-event
in the chat room that should receive these events, then supply the trigger URL as the webhook URL to the event source.
The following commands work in chat:
* @abbot cloud-event list
- List all the trigger URLs used as webhooks.
* @abbot cloud-event list {triggerUrl}
- lists the allowed origins for the specified trigger URL. Instead of the URL, you can specify the number of the trigger URL in the list ex. @abbot list 2
.
* @abbot cloud-event remove {triggerUrl}
- removes all allowed origins for that trigger URL. No webhook requests at that URL will be accepted. You can specify the number of the trigger to remove as well: @abbot remove 2
.
* @abbot cloud-event remove {triggerUrl} {origin}
- removes the specific allowed origin for the trigger URL. You can specify the order of the trigger instead of the trigger URL. Ex. @abbot cloud-event remove 2 example.com
removes example.com
from the allowed origin for the second trigger.
Code
Version History
Version | Created | Author | Release Notes | Installs |
---|---|---|---|---|
1.1.2 | 5/4/2024 | haacked |
|
0 |
1.0.2 | 3/4/2024 | haacked |
No code changes. Updated a couple of comments to clarify why the code does some odd things. |
0 |
1.0.1 | 3/4/2024 | haacked |
Fixed a bug when listing the list of triggers with active web hook subscriptions. |
0 |
1.0.0 | 3/4/2024 | haacked |
✨ This is the initial version of the cloud-event skill. It supports AppService |
1 |
Details
- Last updated
- Installs
- 1 total install
- Language
- CSharp
- License
- MIT License