Skip to content

Commit

Permalink
feat: Amazon SQS Provider (#3002)
Browse files Browse the repository at this point in the history
Signed-off-by: 35C4n0r <[email protected]>
Co-authored-by: Tal <[email protected]>
  • Loading branch information
35C4n0r and talboren authored Jan 13, 2025
1 parent b41b3ad commit 53a3fa0
Show file tree
Hide file tree
Showing 8 changed files with 451 additions and 13 deletions.
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@

<table>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/amazonsqs-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/amazonsqs-icon.png" alt="AmazonSQS"/><br/>
Amazon SQS
</a>
</td>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/appdynamics-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/appdynamics-icon.png" alt="AppDynamics"/><br/>
Expand Down Expand Up @@ -96,14 +102,14 @@
Checkmk
</a>
</td>
</tr>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/cilium-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/cilium-icon.png" alt="Cilium"/><br/>
Cilium
</a>
</td>
</tr>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/cloudwatch-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/cloudwatch-icon.png" alt="CloudWatch"/><br/>
Expand Down Expand Up @@ -134,14 +140,14 @@
Elastic
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://docs.keephq.dev/providers/documentation/gcpmonitoring-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/gcpmonitoring-icon.png" alt="GCP Monitoring"/><br/>
GCP Monitoring
</a>
</td>
</tr>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/grafana-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/grafana-icon.png" alt="Grafana"/><br/>
Expand Down Expand Up @@ -172,12 +178,6 @@
New Relic
</a>
</td>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/openobserve-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/openobserve-icon.png" alt="OpenObserve"/><br/>
OpenObserve
</a>
</td>
</tr>
<tr>
<td align="center" width="150">
Expand Down Expand Up @@ -218,6 +218,12 @@
</td>
</tr>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/openobserve-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/openobserve-icon.png" alt="OpenObserve"/><br/>
OpenObserve
</a>
</td>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/site24x7-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/site24x7-icon.png" alt="Site24x7"/><br/>
Expand Down Expand Up @@ -248,14 +254,14 @@
UptimeKuma
</a>
</td>
</tr>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/victoriametrics-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/victoriametrics-icon.png" alt="VictoriaMetrics"/><br/>
VictoriaMetrics
</a>
</td>
</tr>
<tr>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/zabbix-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/zabbix-icon.png" alt="Zabbix"/><br/>
Expand Down
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"group": "Supported Providers",
"pages": [
"providers/documentation/aks-provider",
"providers/documentation/amazonsqs-provider",
"providers/documentation/appdynamics-provider",
"providers/documentation/argocd-provider",
"providers/documentation/auth0-provider",
Expand Down
64 changes: 64 additions & 0 deletions docs/providers/documentation/amazonsqs-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "AmazonSQS Provider"
sidebarTitle: "AmazonSQS Provider"
description: "The AmazonSQS provider enables you to pull & push alerts to the Amazon SQS Queue."
---

## Overview

The **AmazonSQS Provider** facilitates
Consuming SQS messages as alerts
Notifying/Pushing messages to SQS Queue

## Authentication Parameters

- **Access Key Id** (required): Access Key ID generated from your IAM.
- **Secret Access Key** (required): The secret corresponding to the above key-id.
- **Region Name** (required): The region of your data center eg. us-east-1, ap-sout-1, etc.
- **SQS Queue URL** (required): The url for the SQS Queue.


## Scopes

- **authenticated**: Mandatory for all operations, ensures the user is authenticated.
- **sqs::read**: Mandatory for getting alerts, ensures user can read from the Queue.
- **sqs::write**: Mandatory **only** for Notifying/Pushing messages to queue, ensures user can write to Queue.

If you only want to give read scope to your key-secret pair the permission policy: AmazonSQSReadOnlyAccess
If you only want to give read & write scope to your key-secret pair the permission policy: AmazonSQSFullAccess
Both are the policies are prebuilt in AWS.

## Inputs for AmazonSQS Action

- `message`: str: Body/Message for the notification
- `group_id`: str | None: Mandatory only if Queue is of type FIFO, ignored incase of a normal Queue.
- `dedup_id`: str | None: Mandatory only if Queue is of type FIFO, ignored incase of a normal Queue.
- **kwargs: dict | None: You can pass additional key-value pairs, that will be sent as MessageAttributes in the notification.

## Output for AmazonSQS Action
For more detail, visit [sqs-documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs/client/send_message.html#).
```json
{
'MD5OfMessageBody': 'string',
'MD5OfMessageAttributes': 'string',
'MD5OfMessageSystemAttributes': 'string',
'MessageId': 'string',
'SequenceNumber': 'string'
}
```

<Note>
- When using the AmazonSQS action, if your queue is fifo, then it is **mandatory** to pass a dedup_id & group_id.
- All the extra fields present in the MessageAttribute is stored in alert.label as a key-value pair dictionary.
- You can pass these attributes in the SQS Queue message and keep will extract and use these field for the alert
- name
- status: Possible values 'firing' | 'resolved' | 'acknowledged' | 'suppressed' | 'pending' defaults to 'firing'.
- severity: Possible values 'critical' | 'high' | 'warning' | 'info' | 'low' defaults to 'high'
- description

</Note>

## Useful Links

- [AmazonSQS Boto3 Examples](https://docs.aws.amazon.com/code-library/latest/ug/python_3_sqs_code_examples.html)
- [Boto3 SQS Documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs.html)
8 changes: 8 additions & 0 deletions docs/providers/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ By leveraging Keep Providers, users are able to deeply integrate Keep with the t
}
/>

<Card
title="AmazonSQS"
href="/providers/documentation/amazonsqs-provider"
icon={
<img src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/amazonsqs-icon.png?raw=true" />
}
></Card>

<Card
title="AppDynamics"
href="/providers/documentation/appdynamics-provider"
Expand Down
Binary file added keep-ui/public/icons/amazonsqs-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading

0 comments on commit 53a3fa0

Please sign in to comment.