diff --git a/docs/guides/alerts.mdx b/docs/guides/alerts.mdx index fc9fd7663..a4402fd74 100644 --- a/docs/guides/alerts.mdx +++ b/docs/guides/alerts.mdx @@ -7,9 +7,9 @@ sidebar_label: Alerts Komiser supports webhooks at the views level to incentivize developers on cost and cloud usage and bring accountability to cloud spending. Users can set up personalized notifications to proactively monitor their multi-cloud resources, ensuring timely awareness of important events and potential issues. These alerts can be configured based on various criteria such as custom views, resource costs, and resource usage. Developers can create custom views and set up alerts to monitor resource costs and usage without spending all day monitoring the views. With Komiser, users can set up alerts via [Slack](#slack-integration) or provide [Custom Webhooks](#custom-webhook-integration) to trigger certain actions such as -- Creating a ticket on Jira/Linear to be tackled by the infrastructure team. -- Triggering an alert on an incident & response platform like PagerDuty. -- Running a custom script to resize the infrastructure. +-*Creating a Ticket:* Creating a ticket on Jira/Linear to be tackled by the infrastructure team. +-*Insident Alert:* Triggering an alert on an incident & response platform like PagerDuty. +-*Custom Script Execution:* Running a custom script to resize the infrastructure. Note: The above actions are just a few examples of the endless possibilities that can be set by the user on the webhook receiving end. Komiser sends the required data in a [pre-defined format](#request-details). Alerts are triggered every hour in Komiser. @@ -67,3 +67,53 @@ To integrate a custom webhook, you need a URL that listens to the data posted to "timestamp": 1685794020 // number of seconds since January 1, 1970 UTC when you test the endpoint hence will be different for you } ``` + +## Komiser Alerts Webhook Integration Use Cases +In this guide, we'll explore five practical use cases for the Komiser alerts webhook integration. This integration allows you to trigger actions based on alerts generated by Komiser, helping you proactively manage your cloud resources. We'll also reference the Komiser Alerts documentation to demonstrate how to set up these use cases. + +### Use Case 1: Send Email Alerts to Admin + +**Scenario:** When Komiser alerts trigger, you want to notify your admin team via email and create a ticket in a task management system. + +**Solution:** +1. *Komiser Alert Configuration:* Follow the steps outlined in the [Komiser Alerts](#Steps-to-add-an-Alert) to set up alerts for cost or usage thresholds. +2. *Webhook Integration:* Configure a webhook integration in Komiser to send alerts. +3. *Zapier Integration:* Use Zapier to connect the Komiser webhook to your email service and task management system. Create a Zap that triggers an email to the admin and generates a ticket on Linear. + +### Use Case 2: Automate AWS Lambda Actions + +**Scenario:** When Komiser alerts are triggered, you want to automatically execute actions in AWS Lambda. + +**Solution:** +1. *Komiser Alert Configuration:* Set up alerts as per the [Komiser Alerts](#Steps-to-add-an-Alert). +2. *Webhook Integration:* Configure a webhook in Komiser to send alerts. +3. *AWS Lambda Integration:* Create an AWS Lambda function that is triggered by the Komiser webhook. Define the actions you want Lambda to take when an alert is received. + +### Use Case 3: PagerDuty Incident Alert + +**Scenario:** Komiser alerts should trigger PagerDuty incidents, and you want to create post-mortem documentation. + +**Solution:** +1. *Komiser Alert Configuration:* Set up alerts as described in the [Komiser Alerts](#Steps-to-add-an-Alert). +2. *Webhook Integration:* Configure a webhook integration in Komiser to send alerts. +3. *PagerDuty Integration:* In PagerDuty, set up a service that listens for alerts from Komiser via the webhook. Configure PagerDuty to trigger incidents. +4. *Notion Documentation:* Use Zapier or another integration to automatically create post-mortem documentation in Notion when an incident is triggered in PagerDuty. + +### Use Case 4: Slack Channel Notifications + +**Scenario:** Receive Komiser alerts in a Slack channel for real-time monitoring. + +**Solution:** +1. *Komiser Alert Configuration:* Follow the [Komiser Alerts](#Steps-to-add-an-Alert) to set up alerts. +2. *Slack Integration:* Configure the Komiser webhook integration to send alerts to a Slack channel. Reference the [Slack Integration section](#slack-integration) for guidance. + +### Use Case 5: Custom Script Execution + +**Scenario:** Trigger a custom script when specific Komiser alerts are received. + +**Solution:** +1. *Komiser Alert Configuration:* Configure Komiser alerts according to your requirements. +2. *Webhook Integration:* Set up a webhook integration in Komiser to send alerts. +3. *Custom Script:* Develop a custom script that listens for alerts from Komiser via the webhook. Define the actions you want the script to perform based on the alert content. + +By following these use cases, you can make the most of Komiser's alert webhook integration to automate actions, streamline communication, and enhance your cloud resource management. For detailed setup instructions and webhook configuration, refer to the Komiser Alerts documentation.