All Products
Search
Document Center

CloudMonitor:DescribeSiteMonitorAttribute

Last Updated:Sep 19, 2024

Queries the details of a site monitoring task.

Operation description

This topic provides an example on how to query the details of a site monitoring task whose ID is cc641dff-c19d-45f3-ad0a-818a0c4f****. The returned result indicates that the task name is test123, the URL that is monitored by the task is https://aliyun.com, and the name of the carrier is Alibaba.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeSiteMonitorAttributeget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringYes

The ID of the site monitoring task.

cc641dff-c19d-45f3-ad0a-818a0c4f****
IncludeAlertbooleanNo

Specifies whether to return the information of the alert rules that are configured for the site monitoring task. Valid values:

  • true: The system returns the information of the alert rules that are configured for the site monitoring task.
  • false (default): The system does not return the information of the alert rules that are configured for the site monitoring task.
false

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object

The results returned.

Codestring

The response code.

Note The status code 200 indicates that the request was successful.
200
Messagestring

The returned message.

successful
MetricRulesarray<object>

The information of the alert rules that are configured for the site monitoring task.

object
ActionEnablestring

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.
  • false: The alert rule is disabled.
true
AlarmActionsstring

The alert contact group to which alert notifications are sent.

CloudMonitor
ComparisonOperatorstring

The operator that is used to compare the metric value with the threshold in the alert rule. Valid values:

  • >=
  • >
  • <=
  • <
  • =
  • !=
  • GreaterThanYesterday: greater than the metric value at the same time yesterday
  • LessThanYesterday: less than the metric value at the same time yesterday
  • GreaterThanLastWeek: greater than the metric value at the same time last week
  • LessThanLastWeek: less than the metric value at the same time last week
  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle
  • LessThanLastPeriod: less than the metric value in the last monitoring cycle
GreaterThanYesterday
Dimensionsstring

The dimension of the alert rule.

[{"taskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****" }]
EvaluationCountstring

The consecutive number of times for which the metric value meets the alert condition before an alert is triggered.

3
Expressionstring

The expression that is used to trigger alerts.

$Availability=30
Levelstring

The alert severity. Valid values:

  • 1: critical
  • 2: warning
  • 3: information
2
MetricNamestring

The metric name.

Availability
Namespacestring

The namespace of the cloud service.

The value is in the following format: acs_service name.

acs_networkmonitor
OkActionsstring

The alert contact group that receives alert notifications.

[ "CloudMonitor"]
Periodstring

The time interval. The value is the same as the interval at which metric data is reported. Unit: seconds.

Note If you specify a statistical period for the alert rule, data is queried based on the statistical period.
15s
RuleIdstring

The ID of the alert rule.

bf071ae_7b7aec3817b0fdf****
RuleNamestring

The name of the alert rule.

rule1
StateValuestring

The alert status. Valid values:

  • OK: The alert rule has no active alerts.
  • ALARM: The alert rule has active alerts.
OK
Statisticsstring

The statistical method of the alert rule. Valid values:

  • Availability: the percentage of available detection points
  • AvailableNumber: the number of available detection points
  • ErrorCodeMaximum: a status code for an alert
  • ErrorCodeMinimum: all status codes for a set of alerts
  • Average: response time
Availability
Thresholdstring

The alert threshold.

30
RequestIdstring

The request ID.

D17DF650-7EBD-54D0-903A-1D4E624D7402
SiteMonitorsobject

The details of the site monitoring task.

Addressstring

The URL that is monitored by the site monitoring task.

https://aliyun.com
Intervalstring

The interval at which the site monitoring task is executed. Unit: minutes. Valid values: 1, 5, 15, 30, and 60.

1
IspCitiesarray<object>

The information of detection points. The information includes the carriers that provide the detection points and the cities where the detection points reside.

object
Citystring

The city ID.

738
CityNamestring

The city name.

Ispstring

The carrier ID.

465
IspNamestring

The carrier name.

OptionJsonobject

The extended options of the site monitoring task. The options vary based on the specified protocol. For more information, see CreateSiteMonitor .

attemptslong

The number of retries after a DNS failure occurred.

3
authenticationinteger

Indicates whether the security authentication feature is enabled. Valid values:

  • 0: The feature is disabled.
  • 1: The feature is enabled.
1
cookiestring

The cookie of the HTTP request.

lang=en
dns_match_rulestring

The relationship between the list of expected aliases or IP addresses and the list of DNS results. Valid values:

  • IN_DNS: The list of expected values is a subset of the list of DNS results.
  • DNS_IN: The list of DNS results is a subset of the list of expected values.
  • EQUAL: The list of DNS results is the same as the list of expected values.
  • ANY: The list of DNS results intersects with the list of expected values.
IN_DNS
dns_serverstring

The IP address of the DNS server.

Note This parameter is returned only if the TaskType parameter is set to DNS.
192.168.XX.XX
dns_typestring

The type of the DNS record. This parameter is returned only if the TaskType parameter is set to DNS. Valid values:

  • A (default): a record that specifies an IP address related to the specified host name or domain name.
  • CNAME: a record that maps multiple domain names to a domain name.
  • NS: a record that specifies a DNS server used to parse domain names.
  • MX: a record that links domain names to the address of a mail server.
  • TXT: a record that stores the text information of host name or domain names. The text must be 1 to 512 bytes in length. The TXT record serves as a Sender Policy Framework (SPF) record to fight against spam.
A
expect_valuestring

The domain name or alias to be parsed.

Note This parameter is returned only if the TaskType parameter is set to DNS.
dns_server
failure_ratefloat

The packet loss rate.

Note This parameter is returned only if the TaskType parameter is set to PING.
0.4
headerstring

The header of the HTTP request.

testKey:testValue
http_methodstring

The HTTP request method. Valid values:

  • get
  • post
  • head
get
ip_networkstring

ip_network indicates the network type of the task. Valid values: v4, v6, and auto. Default value: v4.

v4
match_ruleinteger

Indicates whether the alert rule is included. Valid values:

  • 0: The alert rule is included.
  • 1: The alert rule is excluded.
1
passwordstring

The password of the SMTP, POP3, or FTP protocol.

123****
ping_numinteger

The heartbeat of the PING protocol.

29
ping_typestring

The PING protocol type. Valid values:

  • icmp
  • tcp
  • udp
icmp,tcp,udp
portinteger

The port number of the TCP, UDP, SMTP, or POP3 protocol.

110
protocolstring

The protocol that is used to send the request.

TCP
quic_enabledstring

Indicates whether the Quick UDP Internet Connections (QUIC) protocol is used for browser detection. Valid values: true false Default value: false.

true
quic_targetarray

The sites for which the QUIC protocol is forcibly used.

string

The format is url:port for the sites for which the QUIC protocol is forcibly used. You can leave the port number empty. The default port number of 443.

www.taobao.com
request_contentstring

The content of the HTTP request.

aa=bb
request_formatstring

The format of the HTTP request. Valid values:

  • hex: hexadecimal
  • txt: text
txt
response_contentstring

The response to the HTTP request.

txt
response_formatstring

The format of the HTTP response. Valid values:

  • hex: hexadecimal
  • txt: text
txt
time_outlong

The timeout period. Unit: milliseconds.

3
usernamestring

The username of the FTP, SMTP, or POP3 protocol.

testUser
TaskIdstring

The ID of the site monitoring task.

cc641dff-c19d-45f3-ad0a-818a0c4f****
TaskNamestring

The name of the site monitoring task.

test123
TaskStatestring

The status of the site monitoring task. Valid values:

  • 1: The task is enabled.
  • 2: The task is disabled.
1
TaskTypestring

The protocol that is used by the site monitoring task. Valid values: HTTP, HTTPS, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

HTTP
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "successful",
  "MetricRules": {
    "MetricRule": [
      {
        "ActionEnable": "true",
        "AlarmActions": "CloudMonitor",
        "ComparisonOperator": "GreaterThanYesterday",
        "Dimensions": "[{\"taskId\": \"cc641dff-c19d-45f3-ad0a-818a0c4f****\" }]",
        "EvaluationCount": "3",
        "Expression": "$Availability=30",
        "Level": "2",
        "MetricName": "Availability",
        "Namespace": "acs_networkmonitor",
        "OkActions": "[ \"CloudMonitor\"]",
        "Period": "15s",
        "RuleId": "bf071ae_7b7aec3817b0fdf****",
        "RuleName": "rule1",
        "StateValue": "OK",
        "Statistics": "Availability",
        "Threshold": "30"
      }
    ]
  },
  "RequestId": "D17DF650-7EBD-54D0-903A-1D4E624D7402",
  "SiteMonitors": {
    "Address": "https://aliyun.com",
    "AgentGroup": "PC",
    "CustomSchedule": {
      "days": {
        "days": [
          1
        ]
      },
      "end_hour": 18,
      "start_hour": 8,
      "time_zone": "local"
    },
    "Interval": "1",
    "IspCities": {
      "IspCity": [
        {
          "City": "738",
          "CityName": "",
          "Isp": "465",
          "IspName": ""
        }
      ]
    },
    "OptionJson": {
      "assertions": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "json path",
            "target": "0",
            "type": "response_time"
          }
        ]
      },
      "attempts": 3,
      "authentication": 1,
      "blocked_url_list": {
        "blocked_url_list": [
          "www.taobao.com/**"
        ]
      },
      "browser_headers": {
        "browser_headers": [
          {
            "key": "value"
          }
        ]
      },
      "browser_hosts": {
        "browser_hosts": [
          "{\"url\":\"www.taobao.com\",\"ip\":\"127.0.0.1\"}"
        ]
      },
      "browser_info": {
        "browser_info": [
          {
            "browser": "Chrome",
            "device": "laptop"
          }
        ]
      },
      "browser_insecure": false,
      "browser_task_version": "1",
      "cookie": "lang=en",
      "diagnosis_mtr": false,
      "diagnosis_ping": false,
      "dns_hijack_whitelist": "www.taobao.com:www.taobao.com.danuoyi.tbcache.com",
      "dns_match_rule": "IN_DNS",
      "dns_server": "192.168.XX.XX",
      "dns_type": "A",
      "empty_message": false,
      "expect_exist_string": {
        "expect_exist_string": [
          "expected string"
        ]
      },
      "expect_non_exist_string": {
        "expect_non_exist_string": [
          "unexpected string"
        ]
      },
      "expect_value": "dns_server",
      "failure_rate": 0.4,
      "header": "testKey:testValue",
      "http_method": "get",
      "ip_network": "v4",
      "isBase64Encode": "true",
      "match_rule": 1,
      "min_tls_version": "tlsv1.2",
      "password": "123****",
      "ping_num": 29,
      "ping_port": 80,
      "ping_type": "icmp,tcp,udp",
      "port": 110,
      "protocol": "TCP",
      "quic_enabled": "true",
      "quic_target": {
        "quic_target": [
          "www.taobao.com"
        ]
      },
      "request_content": "aa=bb",
      "request_format": "txt",
      "response_content": "txt",
      "response_format": "txt",
      "retry_delay": 0,
      "strict_mode": false,
      "time_out": 3,
      "traffic_hijack_element_blacklist": {
        "traffic_hijack_element_blacklist": [
          "www.taobao.com"
        ]
      },
      "traffic_hijack_element_count": 0,
      "traffic_hijack_element_whitelist": {
        "traffic_hijack_element_whitelist": [
          "www.taobao.com"
        ]
      },
      "username": "testUser",
      "waitTime_after_completion": 3
    },
    "TaskId": "cc641dff-c19d-45f3-ad0a-818a0c4f****",
    "TaskName": "test123",
    "TaskState": "1",
    "TaskType": "HTTP",
    "VpcConfig": {
      "SecurityGroupId": "",
      "VpcId": "",
      "VswitchId": ""
    }
  },
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidQueryParameter%s-
401AccessDeniedExceptionYou donot have sufficient access to perform this action.-
402LimitExceededThe quota for this customer had been reached.-
403ForbiddenYou are not authorized to operate the specified resource.No permission, please use RAM to authorize
404ForbiddenTask Id does not exist-
406ExceedingQuotaExceeding quota limits.-
409%s%s-
429Throttli∂ngExceptionThe request was denied due to request throttling.-
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-05The Error code has changed. The response structure of the API has changedView Change Details
2024-07-31The Error code has changed. The response structure of the API has changedView Change Details
2024-05-16The Error code has changed. The response structure of the API has changedView Change Details
2024-05-16The Error code has changed. The response structure of the API has changedView Change Details
2023-09-04The Error code has changed. The response structure of the API has changedView Change Details
2023-08-22The Error code has changed. The response structure of the API has changedView Change Details
2023-08-04The Error code has changed. The response structure of the API has changedView Change Details
2023-06-15The Error code has changed. The response structure of the API has changedView Change Details
2023-05-22The Error code has changed. The response structure of the API has changedView Change Details
2023-04-06The Error code has changed. The response structure of the API has changedView Change Details
2021-09-16API Description Update. The Error code has changed. The response structure of the API has changedView Change Details