ALIYUN::CMS::SiteMonitor is used to create a site monitoring job.
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 of the site to be monitored. | None |
OptionsJson | String | No | Yes | The extended options of the protocol that is used by the monitoring job. The options vary based on the protocol. | None |
TaskName | String | Yes | Yes | The name of the monitoring job. | 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 monitoring job. | Valid values:
|
IspCities | List | No | Yes | The information about the detection points. | If you leave this parameter empty, the system randomly selects three detection points. For more information, see Isthroughput properties. |
Interval | Integer | No | Yes | The interval at which detection requests are sent. | Default value: 1. Valid values:
|
AlertIds | List | No | No | The IDs of one or more alert rules. | You can call the DescribeMetricRuleList operation to query the IDs of existing alert rules in Cloud Monitor. |
IspCities syntax
"IspCities": [
{
"Isp": String,
"City": String
}
]
Isthroughput properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Isp | String | Yes | No | The name or ID of the carrier to which the detection point belongs. Fuzzy query is supported for carrier names. | For more information, see DescribeSiteMonitorISPCityList. |
City | String | Yes | No | The name or ID of the city where the detection point resides. Fuzzy query is supported for city names. | None |
Response parameters
Fn::GetAtt
TaskId: the ID of the monitoring job.
Examples
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" ] } } } }