-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[MNN] New rule types #21448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[MNN] New rule types #21448
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
a5403f4
added new content
marciocloudflare 148a8a9
refined text
marciocloudflare a82b178
refined text
marciocloudflare 8e6f59e
deleted old pages
marciocloudflare 5e07d12
added static threshold
marciocloudflare 2ad711e
refined text
marciocloudflare 29a44f9
refined text
marciocloudflare ed5da21
refined text
marciocloudflare bdc4d63
added dynamic threshold
marciocloudflare 4810ce1
refined text
marciocloudflare ba8c911
refined url
marciocloudflare 12913ad
refined title
marciocloudflare 1d2edcc
refined url
marciocloudflare ba32156
refined text
marciocloudflare d81d6ba
refined text
marciocloudflare 3e60d97
added sflow rule
marciocloudflare 27f5b9e
corrected url
marciocloudflare 3a13201
refined text
marciocloudflare 3736236
refined text
marciocloudflare 3b4896a
refined text
marciocloudflare 836937a
added ul
marciocloudflare cf752ee
added rule notifications
marciocloudflare 2b96af5
refined text
marciocloudflare 2fe88db
refined text
marciocloudflare dc67623
refined text
marciocloudflare 53e4dfd
refined links
marciocloudflare b5fd79c
refined text
marciocloudflare 2d40bc7
refined url
marciocloudflare dacf4ab
refined text
marciocloudflare 458233e
deleted old notification page
marciocloudflare 66f174c
added redirects
marciocloudflare b47f8b0
corrected link
marciocloudflare b2e27d2
refined text
marciocloudflare 469fc78
Apply suggestions from code review
marciocloudflare 23523ea
refined text
marciocloudflare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
src/content/docs/magic-network-monitoring/notifications.mdx
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
src/content/docs/magic-network-monitoring/rules/dynamic-threshold.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| --- | ||
| title: Dynamic threshold rule | ||
| pcx_content_type: how-to | ||
| sidebar: | ||
| order: 2 | ||
| badge: | ||
| text: Beta | ||
| --- | ||
|
|
||
| A dynamic threshold rule (beta) will analyze a network's traffic patterns over time and automatically adjust the rule's DDoS threshold, in terms of bits or packets, based on traffic history. The total traffic across all IP prefixes and IP addresses in the rule is compared to the current value of the dynamic threshold. If the total traffic exceeds the dynamic threshold, then an alert is sent. | ||
|
|
||
| Dynamic thresholds are calculated using a statistical measure called [Z-score](https://en.wikipedia.org/wiki/Standard_score) (also referred to as standard score). Review [How the dynamic rule threshold is calculated](#how-the-dynamic-rule-threshold-is-calculated) to learn more. | ||
|
|
||
| Customers that send NetFlow and/or sFlow data to Cloudflare can configure dynamic threshold rules. | ||
|
|
||
| A dynamic threshold rule can only be configured via [Cloudflare's Magic Network Monitoring Rules API](/api/resources/magic_network_monitoring/subresources/rules/). Today, customers are unable to configure dynamic threshold rules in the Cloudflare dashboard. | ||
|
|
||
| ## Rule configuration fields | ||
|
|
||
| | Field | Description | | ||
| | :---- | :---- | | ||
| | **Rule name** | Must be unique and cannot contain spaces. Supports characters `A-Z`, `a-z`, `0-9`, underscore (`_`), dash (`-`), period (`.`), and tilde (`~`). Maximum of 256 characters. | | ||
| | **Rule type** | zscore | | ||
| | **Target** | Can be defined in either bits per second or packets per second. | | ||
| | **Sensitivity** | Z-Score sensitivity has three values: low, medium, and high. | | ||
| | **Auto-advertisement** | If you are a [Magic Transit On Demand](/magic-transit/on-demand) customer, you can enable this feature to automatically enable Magic Transit if the rule's dynamic threshold is triggered. To learn more and see an example, view the [Auto-Advertisement section](/magic-network-monitoring/rules/rule-notifications/#rule-auto-advertisement-notifications). | | ||
| | **Rule IP prefix** | The IP prefix associated with the rule for monitoring traffic volume. Must be a CIDR range such as `160.168.0.1/24`. The maximum is 5,000 unique CIDR entries. To learn more and review an example, refer to the [Rule IP prefixes](/magic-network-monitoring/rules/#rule-ip-prefixes). | | ||
|
|
||
| ## API documentation | ||
|
|
||
| to review an example API configuration call using CURL and the expected output for a successful response, go to [Magic Network Monitoring](/api/resources/magic_network_monitoring/) in [developers.cloudflare.com/api/](/api/) and expand the [Rules](/api/resources/magic_network_monitoring/subresources/rules/) section. | ||
|
|
||
| ## How the dynamic rule threshold is calculated | ||
|
|
||
| Dynamic thresholds for this rule type are calculated using a statistical measure called Z-Score. The dynamic threshold for this rule will automatically adjust based on your traffic history as this rule uses statistical analysis to detect traffic anomalies. Z-Score is calculated by comparing short-term traffic patterns (five-minute time window) against long-term baselines (four-hour time window) . | ||
|
|
||
| Z-Score is calculated by using the following formula: | ||
|
|
||
| ```txt | ||
| Z = (X - μ) / σ | ||
| ``` | ||
|
|
||
| - `X` = Current traffic value. | ||
| - `μ` = Mean traffic value over the long window. | ||
| - `σ` = Standard deviation over the long window. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/content/docs/magic-network-monitoring/rules/rule-notifications.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| title: Configure rule notifications | ||
| pcx_content_type: how-to | ||
| sidebar: | ||
| order: 4 | ||
| --- | ||
|
|
||
| After configuring one or multiple rule types in Magic Network Monitoring, customers can also choose to receive notifications via email, webhook, or PagerDuty when a rule is triggered. | ||
|
|
||
| Customers can configure multiple rule types and alerts together to create layers of DDoS protection based on their network environment and their security needs. | ||
|
|
||
| You can read [Cloudflare's Notifications documentation](/notifications/) for more information on our notification platform including: | ||
|
|
||
| - [Configure Cloudflare notifications](/notifications/get-started/) | ||
| - [Configure PagerDuty](/notifications/get-started/configure-pagerduty/) | ||
| - [Configure webhooks](/notifications/get-started/configure-webhooks/) | ||
| - [Test a notification](/notifications/get-started/#test-a-notification) | ||
| - [Notification History](/notifications/notification-history/) | ||
|
|
||
| ## Magic Network Monitoring notification configuration fields | ||
|
|
||
| | Field | Description | | ||
| | :---- | :---- | | ||
| | **Notification name** | The name of the Magic Network Monitoring notification (MNM) for the rule type that was selected. | | ||
| | **Description (optional)** | The description of the MNM notification. | | ||
| | **Webhooks** | The webhook(s) that will receive the MNM notification. | | ||
| | **Notification email** | The email(s) that will receive the MNM notification. | | ||
|
|
||
| ## Rule Auto-Advertisement notifications | ||
|
|
||
| Webhook, PagerDuty, and email notifications are sent following an auto-advertisement attempt for all prefixes inside the flagged rule. | ||
|
|
||
| You will receive the status of the advertisement for each prefix with the following available statuses: | ||
|
|
||
| - **Advertised**: The prefix was successfully advertised. | ||
| - **Already Advertised**: The prefix was advertised prior to the auto advertisement attempt. | ||
| - **Delayed**: The prefix cannot currently be advertised but will attempt advertisement. After the prefix can be advertised, a new notification is sent with the updated status. | ||
| - **Locked**: The prefix is locked and cannot be advertised. | ||
| - **Could not Advertise**: Cloudflare was unable to advertise the prefix. This status can occur for multiple reasons, but usually occurs when you are not allowed to advertise a prefix. | ||
| - **Error**: A general error occurred during prefix advertisement. | ||
|
|
||
| ## Configure static threshold notifications | ||
|
|
||
| To configure static threshold notifications: | ||
|
|
||
| 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login), and select your account. | ||
| 2. Go to **Notifications** > **Add**. | ||
| 3. Select **Magic Transit** from the product dropdown menu. | ||
| 4. Find the **Magic Network Monitoring: Volumetric Attack** alert, and select **Select**. | ||
| 5. Fill in the notification configuration details. | ||
| 6. Select **Save**. | ||
|
|
||
| ## Configure dynamic threshold notifications | ||
|
|
||
| To configure dynamic threshold notifications: | ||
|
|
||
| 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login), and select your account. | ||
| 2. Go to **Notifications** > **Add**. | ||
| 3. Select **Magic Transit** from the product dropdown menu. | ||
| 4. Find the **Magic Network Monitoring: Volumetric Attack** alert, and select **Select**. | ||
| 5. Fill in the notification configuration details. | ||
| 6. Select **Save**. | ||
|
|
||
| ## Configure sFlow DDoS attack notifications | ||
|
|
||
| To configure sFlow DDoS attack notifications: | ||
|
|
||
| 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login), and select your account. | ||
| 2. Go to **Notifications** > **Add**. | ||
| 3. Select **Magic Transit** from the product dropdown menu. | ||
| 4. Find the **Magic Network Monitoring: DDoS Attack** alert, and select **Select**. | ||
| 5. Fill in the notification configuration details. | ||
| 6. Select **Save**. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.