Cloud Monitor provides the availability monitoring feature to help you check whether a local service responds as expected. If a local service times out or returns an error code, Cloud Monitor sends an alert notification to you.
Prerequisites
The Cloud Monitor agent is installed on the host that you want to monitor. This is required because the availability monitoring of a local service depends on the Cloud Monitor agent. For more information, see Cloud Monitor.
One or more application groups are created. For more information, see Create an application group.
Procedure
Log on to the Cloud Monitor console.
In the left-side navigation pane, choose .
On the Application Groups tab, click the name of the application group.
In the left-side navigation pane of the page that appears, click Availability Monitoring.
Click Create Availability Monitoring Task.
In the Create/Modify Availability Monitoring Task panel, configure the task parameters.
Parameter
Description
Task Name
The name of the availability monitoring task.
Monitoring Nodes
The IDs of the instances from which you want to send detection requests.
Monitored Object
The object that you want to monitor.
Set the Monitored Object parameter to URL or IP Address.
Detection Type
The method that you want to use to monitor the object. You can select one of the following methods:
HTTP(S): If you select this option, enter the URL that you want to monitor and set the request method to HEAD, GET, or POST. Format:
http://localhost:port/path.TELNET: If you select this option, enter the IP address that you want to monitor. Format:
127.0.0.1:port.PING: If you select this option, enter the IP address that you want to monitor.
For example, to check whether Apache Tomcat responds as expected, select HTTP(S) and enter
http://localhost:8080/monitor. To check the connectivity of a MySQL database, select TELNET and enter127.0.0.1:3306.Request Method
The request method. Valid values: HEAD, GET, and POST.
NoteThis parameter is required if you set the Detection Type parameter to HTTP(S).
Monitoring Frequency
The interval at which detection requests are sent.
Valid values: 15 Seconds, 30 Seconds, 1 Minute, 2 Minutes, 5 Minutes, 15 Minutes, 30 Minutes, and 60 Minutes. For example, if you select 1 Minute, Cloud Monitor sends a detection request to the monitored object every minute.
NoteThis parameter is required if you set the Detection Type parameter to HTTP(S).
Headers
The HTTP or HTTPS headers of detection requests for site monitoring.
A header must be in the
parameter1:value1format.Separate multiple headers with commas (,).
NoteThis parameter is required if you set the Detection Type parameter to HTTP(S).
POST Content
The content of POST requests for site monitoring.
The content must be in the
parameter1=value1¶meter2=value2format and must be in English.NoteThis parameter is required if you set the Detection Type parameter to HTTP(S) and the Request Method parameter to POST.
Match Response Content
The response content that you want to match and the method used to match the response content.
If you specify response content, the monitoring task checks whether the first 64 KB of the HTTP response body contains the response content that you specify. Valid values:
Generate Alerts If Response Contains
Alert if the matching content not included.
NoteThis parameter is required if you set the Detection Type parameter to HTTP(S).
Click Next.
In the Configure Alert Rule step, configure parameters for the alert rule.
Parameter
Description
Status Code
If the status code reaches the specified value, an alert is triggered.
An alert is triggered regardless of which value of the Status Code parameter or the Response Time parameter reaches the threshold. Cloud Monitor sends alert notifications to the alert contact group of the application group.
Response Time
If the response time reaches the specified value, an alert is triggered.
An alert is triggered regardless of which value of the Status Code parameter or the Response Time parameter reaches the threshold. Cloud Monitor sends alert notifications to the alert contact group of the application group.
Notification Methods
The alert level and the methods that are used to send alert notifications. Valid values:
Info (Email + Webhook)
Alert Callback
The callback URL that can be accessed over the Internet. Cloud Monitor sends HTTP POST requests to push alert notifications to the specified URL. Only the HTTP protocol is supported.
Mute Period
The interval at which Cloud Monitor resends an alert notification before the alert is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.
Cloud Monitor sends an alert notification when a metric value reaches the threshold. If the metric value reaches the threshold again within the mute period, Cloud Monitor does not resend an alert notification. If the alert is not cleared after the mute period ends, Cloud Monitor resends an alert notification.
Effective Period
The period during which the alert rule is effective. Cloud Monitor sends alert notifications only within the effective period of the alert rule and records events when the effective period expires.
Log Service
If you turn on this switch, the alert information is sent to the specified Logstore when an alert is triggered. In this case, you must configure the Region, ProjectName, and Logstore parameters.
For more information about how to create a project and a Logstore, see Collect and analyze ECS text logs using LoongCollector.
Click OK.