Creates a site monitoring task in CloudMonitor.
Syntax
{
"Type": "ALIYUN::CMS::SiteMonitor",
"Properties": {
"Address": String,
"OptionsJson": String,
"TaskName": String,
"TaskType": String,
"IspCities": List,
"Interval": Integer,
"AlertIds": List
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Address |
String |
Yes |
Yes |
The URL or IP address to monitor. |
None. |
|
TaskName |
String |
Yes |
Yes |
The name of the site monitoring task. |
The name must be 4 to 100 characters in length, and can contain letters, digits, and underscores (_). |
|
TaskType |
String |
Yes |
No |
The type of the site monitoring task. |
Valid values:
|
|
AlertIds |
List |
No |
No |
The IDs of the alert rules. |
You can call the DescribeMetricRuleList operation to query the IDs of alert rules in CloudMonitor. |
|
Interval |
Integer |
No |
Yes |
The monitoring interval. |
Valid values:
Unit: minutes. |
|
IspCities |
List |
No |
Yes |
The detection points. |
If you leave this property empty, the system randomly selects three detection points. For more information, see IspCities properties. |
|
String |
No |
Yes |
The extended options of the protocol for the site monitoring task. The options vary by protocol. |
None. |
IspCities syntax
"IspCities": [
{
"Isp": String,
"City": String
}
]
IspCities properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
City |
String |
Yes |
No |
The name or ID of the city where the detection point resides. Fuzzy match is supported. |
None. |
|
Isp |
String |
Yes |
No |
The name or ID of the carrier to which the detection point belongs. Fuzzy match is supported. |
For more information, see DescribeSiteMonitorISPCityList. |
Return values
Fn::GetAtt
TaskId: the ID of the site monitoring task.
Examples
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
SiteMonitor:
Type: ALIYUN::CMS::SiteMonitor
Properties:
Address: aliyun.com
TaskName: DemoTask
TaskType: http
Outputs:
TaskId:
Description: The ID of the site monitoring task.
Value:
Fn::GetAtt:
- SiteMonitor
- TaskId
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"SiteMonitor": {
"Type": "ALIYUN::CMS::SiteMonitor",
"Properties": {
"Address": "aliyun.com",
"TaskName": "DemoTask",
"TaskType": "http"
}
}
},
"Outputs": {
"TaskId": {
"Description": "The ID of the site monitoring task.",
"Value": {
"Fn::GetAtt": [
"SiteMonitor",
"TaskId"
]
}
}
}
}