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

PropertyTypeRequiredEditableDescriptionConstraint
AddressStringYesYesThe URL or IP address of the site to be monitored.None
OptionsJsonStringNoYesThe extended options of the protocol that is used by the monitoring job. The options vary based on the protocol.None
TaskNameStringYesYesThe name of the monitoring job.The name must be 4 to 100 characters in length, and can contain letters, digits, and underscores (_).
TaskTypeStringYesNoThe type of the monitoring job.Valid values:
  • HTTP(S)
  • PING
  • TCP
  • UDP
  • DNS
  • SMTP
  • POP3
  • FTP
IspCitiesListNoYesThe information about the detection points.If you leave this parameter empty, the system randomly selects three detection points.

For more information, see Isthroughput properties.

IntervalIntegerNoYesThe interval at which detection requests are sent.Default value: 1. Valid values:
  • 1
  • 5
  • 15
Unit: minutes.
AlertIdsListNoNoThe 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

PropertyTypeRequiredEditableDescriptionConstraint
IspStringYesNoThe name or ID of the carrier to which the detection point belongs. Fuzzy query is supported for carrier names.For more information, see DescribeSiteMonitorISPCityList.
CityStringYesNoThe 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

  • YAMLformat

    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            
  • JSONformat

    {
      "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"
            ]
          }
        }
      }
    }