This topic describes how to configure the event monitoring rules for Web Application Firewall (WAF) in the CloudMonitor console. You can configure CloudMonitor to monitor events on the domains protected by WAF and send alerts to you. This can help you recover your workloads at the earliest opportunity. CloudMonitor can detect WAF events detected by access control, HTTP flood attack protection, web attack protection, and anti-scanning.
CloudMonitor is a service that monitors Internet applications and Alibaba Cloud resources. It supports event monitoring, which allows you to query and analyze system events occur on cloud services. With event monitoring, you can easily track how your cloud services are used.
You can query the access control, HTTP flood attacks, web attacks, and anti-scanning events that have been detected on the domains protected by WAF and add alert rules for the events. You can configure CloudMonitor to alert you about critical events by sending messages or returning callbacks. Supported messages include SMS messages, emails, and DingTalk messages. With the event monitoring feature, you can build an automated operations and maintenance system to detect and handle events at the earliest opportunity. For more information, see An overview of event monitoring.
CloudMonitor supports monitoring the following WAF events.
|Event||Description||Type||Status value||Event level|
|waf_event_aclattack||Access control events||acl||start/end||CRITICAL|
|waf_event_ccattack||HTTP flood attack events||cc||start/end||CRITICAL|
|waf_event_webattack||Web attack events||web||start/end||CRITICAL|
- Log on to the CloudMonitor console.
- Optional: Add an alert recipient. If you have already specified a recipient, you can skip this
- In the left-side navigation pane, choose .
- On the Alarm Contacts tab, click Create Alarm Contact in the upper-right corner.
- In the Set Alarm Contact dialog box that appears, enter the required contact information. Verify the Phone or Email ID, and then click Save.
The alert recipient is saved.
- Optional: Create an alert contact group. If you have already created an alert contact group,
you can skip this step.
Note The recipients of alert notifications must be contact groups. You can add one or more recipients to a contact group.
- In the left-side navigation pane, choose .
- On the Alarm Contact Group tab, click Create Alarm Contact Group in the upper-right corner.
- In the Create Alarm Contact Group dialog box that appears, enter a group name in the Group Name field. Select recipients from the left-side Existing Contacts list and add them to the right-side Selected Contacts list. Click OK.
The contact group is created.
- Create an event alert rule for WAF.
- In the left-side navigation pane, click Event Monitoring.
- On the Alarm Rules tab, select System Event, and click Create Event Alert.
- Configure the alert rule in the Create/Modify Event Alert pane and click OK. The parameters are described as follows.
Category Configuration item Description Basic information Alarm Rule Name Enter the name of the alert rule. Event alert Event Type Select System Event. Product Type Select WAF. Event Type Select WAF attack events. Event Level Select the level of the event. Valid values:CRITICAL, WARN, and INFO. You can select multiple levels but you must select CRITICAL. Event Name Select the type of events which CloudMonitor will alert you about. Valid values:
You can select multiple event types. The event levels must be CRITICAL.
Resource Range Select All Resources. Alarm Type Alarm Notification Select Alarm Notification, and configure the Contact Group and Notification Method.
- Contact Group: Select an existing contact group.
- Notification Method: Select Warning (Message+Email ID+DingTalk Robot) or Info (Email ID+DingTalk Robot).
You can click Add to add more contact groups and notification methods.
MNS queue This option is not required. Function service This option is not required. URL callback This option is not required. Log Service This option is not required.You have created a WAF event alert rule. When a specific event occurs on a domain name that is added to WAF, the contact group specified in the alert rule receives an alert.
- Optional: Query events. You can also query the recent WAF events in the CloudMonitor console.
- Click the Query Event tab of the Event Monitoring page.
- Select System Event and WAF, and specify the event type and time period to query the events.
- You can click View the Detail in the Operation column to view details of an event.