All Products
Search
Document Center

CloudMonitor:DescribeSiteMonitorAttribute

Last Updated:Mar 01, 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

There is currently no authorization information disclosed in the API.

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 returned data.

Codestring

The response code.

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

The returned message.

successful
RequestIdstring

The request ID.

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

Indicates whether the request was successful. Valid values:

  • true
  • false
true
SiteMonitorsobject

The details of the site monitoring task.

TaskTypestring

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

HTTP
Intervalstring

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

1
TaskStatestring

The status of the site monitoring task. Valid values:

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

The name of the site monitoring task.

test123
Addressstring

The URL that is monitored by the site monitoring task.

https://aliyun.com
TaskIdstring

The ID of the site monitoring task.

cc641dff-c19d-45f3-ad0a-818a0c4f****
IspCitiesobject []

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

Citystring

The city ID.

738
IspNamestring

The carrier name.

Ispstring

The carrier ID.

465
CityNamestring

The city name.

OptionJsonobject

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

request_formatstring

The format of the HTTP request. Valid values:

  • hex: hexadecimal
  • txt: text
txt
response_contentstring

The response to the HTTP request.

txt
portinteger

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

110
authenticationinteger

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

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

Indicates whether the alert rule is included. Valid values:

  • 0: The alert rule is included.
  • 1: The alert rule is excluded.
1
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
request_contentstring

The content of the HTTP request.

aa=bb
usernamestring

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

testUser
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
response_formatstring

The format of the HTTP response. Valid values:

  • hex: hexadecimal
  • txt: text
txt
passwordstring

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

123****
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
time_outlong

The timeout period. Unit: milliseconds.

3
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
cookiestring

The cookie of the HTTP request.

lang=en
ping_numinteger

The heartbeat of the PING protocol.

29
http_methodstring

The HTTP request method. Valid values:

  • get
  • post
  • head
get
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
attemptslong

The number of retries after a DNS failure occurred.

3
protocolstring

The protocol that is used to send the request.

TCP
MetricRulesobject []

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

MetricNamestring

The metric name.

Availability
EvaluationCountstring

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

3
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"]
AlarmActionsstring

The alert contact group to which alert notifications are sent.

CloudMonitor
RuleIdstring

The ID of the alert rule.

bf071ae_7b7aec3817b0fdf****
RuleNamestring

The name of the alert rule.

rule1
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
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
Expressionstring

The expression that is used to trigger alerts.

$Availability=30
Dimensionsstring

The dimension of the alert rule.

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

The alert status. Valid values:

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

Indicates whether the alert rule is enabled. Valid values:

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

The alert severity. Valid values:

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

The alert threshold.

30
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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
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.
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
2023-09-04The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-08-22The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-08-04The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-06-15The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-05-22The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-04-06The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2021-09-16API Description Update. The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 401
    delete Error Codes: 402
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 406
    delete Error Codes: 409
    delete Error Codes: 429
    delete Error Codes: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.