Skip to content

Commit 894ecbc

Browse files
committed
feat(notification integration): 📝 notification integration doc
1 parent 1e2ce7d commit 894ecbc

File tree

12 files changed

+3589
-1406
lines changed

12 files changed

+3589
-1406
lines changed

crowdsec-docs/package-lock.json

+3,420-1,406
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crowdsec-docs/sidebarsUnversioned.js

+21
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,27 @@ module.exports = {
265265
label: "Service API 🏅",
266266
href: "/u/service_api/getting_started",
267267
},
268+
{
269+
type: "category",
270+
label: "Notification integrations 🏅",
271+
items: [
272+
{
273+
type: "doc",
274+
label: "Overview",
275+
id: "console/notification_integrations/overview",
276+
},
277+
{
278+
type: "doc",
279+
label: "Notification Rule",
280+
id: "console/notification_integrations/rule",
281+
},
282+
{
283+
type: "doc",
284+
label: "Slack",
285+
id: "console/notification_integrations/slack",
286+
},
287+
],
288+
},
268289
],
269290
remediationSideBar: [
270291
{
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
id: overview
3+
title: Overview
4+
---
5+
6+
Discover all the available notification integrations in CrowdSec. Each integration is designed to help you receive alerts and notifications to various platforms, ensuring you stay informed about security events and incidents. Available [here](https://app.crowdsec.net/settings/integrations).
7+
8+
> 🌟 Premium feature. CrowdSec let you be linked to any notification integration. However, you need to be a ⭐ Premium organization to unlock the full potential of the notification integrations.
9+
10+
## Available Integrations
11+
12+
- [Slack](/u/console/notification_integrations/slack)
13+
- Coming soon: Discord
14+
- Coming soon: Webhook
15+
- Coming soon: Microsoft Teams
16+
17+
## How to use notification integrations
18+
19+
1. **Link your integration**: Navigate to the **Settings > Integrations** section in the CrowdSec Console and select the integration you want to link. Follow the instructions provided for each integration.
20+
2. [**Create a notification rule**](/u/console/notification_integrations/rule): Once your integration is linked, navigate to the **Rules** tab of the integration page. Here, you can create notification rules based on specific events or conditions. ([See the documentation](/u/console/notification_integrations/rule) for more details on creating rules.)
21+
22+
## Available Events
23+
24+
The following events are available for notification integrations:
25+
26+
**Threat Hunting**
27+
28+
| Name | Description |
29+
|------|-------------|
30+
Is Attacking | An attack has been detected from your Security Engine. |
31+
Is Attacked | Your organization is being attacked. |
32+
Alert Triggered | An alert has been triggered. |
33+
34+
35+
36+
**Stack - Management**
37+
38+
| Name | Description |
39+
|------|-------------|
40+
Security Engine Enrolled | A new Security Engine has been enrolled. |
41+
Security Engine Unenrolled | A Security Engine has been unenrolled. |
42+
Security Engine Long Pending Enroll | A Security Engine has been pending for a long time. |
43+
44+
**Stack - Monitoring**
45+
46+
| Name | Description |
47+
|------|-------------|
48+
Firewall Integration Offline | A firewall integration is offline. |
49+
Log Processor No Alert | A log processor has not sent any alerts for 48h. |
50+
Log Processor Offline | A log processor is offline. |
51+
Remediation Component Integration Offline | A remediation component integration is offline. |
52+
Remediation Component Offline | A remediation component is offline. |
53+
CrowdSec Stack Component Outdated | A CrowdSec stack component is outdated (Security Engine, Log Processor, Remediation component). |
54+
Security Engine No Alerts | A Security Engine has not sent any alerts for 48h. |
55+
Security Engine Offline | A Security Engine is offline. |
56+
57+
**Admin**
58+
59+
| Name | Description |
60+
|------|-------------|
61+
API Key Expired | An API key has expired. |
62+
Payment Failed | A payment has failed. |
63+
64+
65+
## Examples
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
id: rule
3+
title: Notification rule
4+
---
5+
6+
> 🌟 Premium feature.
7+
8+
Notification rules allow you to customize the alerts and notifications you receive from your CrowdSec Console.
9+
By setting up specific rules, you can ensure that you are only notified about events that are relevant to your organization.
10+
This guide will walk you through the process of creating a notification rule for your linked integration.
11+
12+
> You need at least one integration linked to your CrowdSec Console to create a notification rule.
13+
> If you haven't linked an integration yet, please refer to the [Integrations Overview](/u/console/notification_integrations/overview) for more information on how to do so.
14+
15+
## Create a notification rule
16+
17+
1. In the [CrowdSec Console](https://app.crowdsec.net), navigate to **Settings > Notifications** or **Settings > Integrations > (integration of your choice)** and click on add rule.
18+
19+
![](/img/console/notification_integrations/notification-rule-list.png)
20+
21+
2. Select the events you want to be notified about. You can only select one of the three category at the time (Threat Hunting, Stack or Admin). Each of these categories contains a list of [events](/notification_integrations/overview.mdx) that you can choose from. (Threat hunting category let you select only one event due to its conditions variance).
22+
23+
![](/img/console/notification_integrations/events-selection.png)
24+
25+
3. (Optional) Select a conditions. **Stack** category allows you to filter on Security Engine(s). **Threat Hunting > Alert trigger event** allows you to select specific scenarios.
26+
27+
**Engine condition:**
28+
29+
![](/img/console/notification_integrations/engine-condition-selection.png)
30+
31+
**Installed scenarios:**
32+
33+
{/* ![](/img/console/notification_integrations/scenario-condition-selection.png) */}
34+
35+
4. Select destination, which is the integration you want to use for this rule. You can select multiple destination for one rule. Destination input varies depending on the integration you selected. For example, Slack integration let you select a channel, while Webhook integration let you select a URL.
36+
37+
![](/img/console/notification_integrations/slack-destination-selection.png)
38+
39+
5. Name and describe your rule.
40+
41+
![](/img/console/notification_integrations/rule-information.png)
42+
43+
6. Click on **Create** to save your rule.
44+
45+
7. Your rule will now appear in the list of notification rules for your integration. You can edit or delete it at any time.
46+
47+
![](/img/console/notification_integrations/notification-rule-list.png)
48+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: slack
3+
title: Slack
4+
---
5+
6+
7+
## Link your workspace
8+
9+
By default Slack let any workspace member add application to it. If you want to learn more about it you can check [this Slack article](https://slack.com/intl/en-gb/help/articles/202035138-Add-apps-to-your-Slack-workspace).
10+
11+
1. In the [CrowdSec Console](https://app.crowdsec.net), navigate to **Settings > Integrations** and then select **Configure** in the Slack row.
12+
13+
![](/img/console/notification_integrations/configure-slack.png)
14+
15+
2. Select the Slack workspace you want to link to your CrowdSec Console using the dropdown menu on top-tight of the page. Then select **Allow**. Repeat the process if you want to link more workspace.
16+
17+
3. You should be redirected to the Slack integration page. You can now create a notification rule by navigating to the **Rules** tab.
18+
19+
![](/img/console/notification_integrations/slack-configuration-tab.png)
20+
21+
Your Slack integration is now linked to your CrowdSec Console. If you want to link the integration to a private channel, invite it directly from the Slack channel.
22+
23+
## Create a notification rule
24+
25+
1. In the [CrowdSec Console](https://app.crowdsec.net), navigate to **Settings > Integrations > Slack** go to the Rules tab and click on **Add rule**.
26+
27+
2. Follow the steps in the [Create a notification rule](/u/console/notification_integrations/rule) documentation to create your rule.
28+
29+
## Troubleshooting
30+
31+
### Rate Limiting Error
32+
33+
If you're attempting to create or update a notification rule and are receiving the following error: "Slack rate limit exceeded.", you should enter channel ID instead of the channel Name and wait for a minute. If your workspace has a lot of channels, we advise your to directly add the channel ID next time.
34+
35+
To find a channel's ID in Slack click the name of the channel at the top of the application and the channel ID will be displayed at the bottom of the modal.

0 commit comments

Comments
 (0)