CloudMonitor provides inbound traffic, outbound traffic, response time, and other metric data at the API Gateway, and helps you obtain the API Gateway service’s use information. After you activate your API Gateway instance, CloudMonitor automatically starts monitoring the instance.  After you activate your API Gateway instance,  CloudMonitor automatically starts monitoring the instance. You can access the CloudMonitor API Gateway page to view the metric data.  You can configure alert policies for metrics so that an alert is reported when a data exception occurs.

Monitoring Services

  • Metrics
    Metric Definition Dimension Unit Minimum monitor Granularity
    Error Distribution Number of times of 2XX, 4XX, and 5XX status codes returned for an API in one monitoring period. User and API Count 1 minute
    Inbound traffic The sum of traffic of requests from an API in one monitoring period User and API Bytes 1 minute
    Outbound traffic The sum of traffic of requests from an API in one monitoring period. User and API Bytes 1 minute
    Response time The difference between the time when the gateway calls a backend service through an API and the time when the backend service receives the return result in one monitoring period. User and API Second 1 minute
    The sum of requests  received by an API in one monitoring period. User and API  per time 1 minute
  • View metric data
    1. Log on to the CloudMonitor console.
    2. Go to the API Gateway instance list under Cloud Service Monitoring.
    3. Click an instance name in the product instance list or click Metric Chart in the Actions column to access the instance monitoring details page.
    4. Click the Chart Size button to switch to large chart display (optional).

Alarm service

  • Parameter descriptions
    • Metrics: The monitoring indicators provided by the API Gateway.

    • Period: The alert system checks whether your monitoring data has exceeded the alert threshold value based on the period.   For example, if the period of the alert policy for memory usage is set to one minute, the system checks whether the memory usage has exceeded the threshold value every other minute.

    • Statistic: This sets the method used to determine if the data exceed the threshold. Average, maximum, minimum, and sum can be set in the statistic.

      • Average: The average value of metric data within a statistical period.   The statistic result is the average of all metric data collected within 15 minutes. An average value of over 80%  is deemed to exceed the threshold.

      • Maximum: The maximum value of metric data within a statistical period.  When the maximum value of the metric data collected within the period is over 80%, the value exceeds the threshold.

      • Minimum: The minimum value of metric data within a statistical period. When the minimum value of the metric data collected within the period is larger than 80%, the value exceeds the threshold.

      • Sum: The sum of metric data within a statistical period.   When the sum of the metric data collected within the period is over 80%,  it exceeds the threshold. The above statistics are needed for traffic-based indicators.

    • Trigger Alert After Threshold Value Is Exceeded Several Times: This refers to an alert which is triggered when the value of the metric continuously exceeds the threshold value in several consecutive periods.

      For example, you may set the alert to go off when the CPU usage rate exceeds 80% within a 5-minute  period after the threshold value is exceeded for three times. If the CPU usage rate is found to exceed 80% for the first time, no alert is triggered.  If the CPU usage rate exceeds 80% again in the following 5-minute period, it still does not trigger an alert.  n alert is reported only if the CPU usage rate exceeds 80% for a third time in the third period.    That is, from the first time when the actual data exceeds the threshold to the time when the alert policy is triggered, the minimum time consumed is: the period*(the quantity of consecutive detection times-1) = 5*(3-1) = 10 minutes.

  • Set an alarm rule
    1. Log on to the CloudMonitor console.
    2. Go to the API Gateway instance list under Cloud Service Monitoring.
    3. Click an instance name in the product instance list or click Alarm Rules in the Actions column to access the instance monitoring details page.
    4. Click Create Alarm Rules  at the upper right of the alert policies page to create an alert policy based on the entered parameters.