HUAWEI CLOUD Cloud Eye is a multi-dimensional resource monitoring service. You can use Cloud Eye to monitor HUAWEI CLOUD Elastic Cloud Server (ECS) instances and bandwidth. You can configure a URL that is provided by the alert ingestion system of Log Service in HUAWEI CLOUD Simple Message Notification (SMN). After you configure the URL, Cloud Eye uses SMN to send alerts to Log Service. Then, the alerting system of Log Service denoises the alerts and sends alert notifications.
Prerequisites
Configure Cloud Eye
Cloud Eye alerts
{
"signature": "NR9taTRU****qH0D8htN",
"subject": "[Major Alarm] Cloud Eye Notification: Host monitoring - An alarm is triggered for the (Agent) CPU utilization of ECS "hecs****6789".",
"topic_urn": "urn:smn:cn-east-3:1a2b3c4d5e6f7g:tosls",
"message_id": "1a2b3c4d5e6f7g8h9i",
"signature_version": "v1",
"type": "Notification",
"message":
{
"message_type": "alarm",
"alarm_id": "al1234567890",
"alarm_name": "alarm-abc",
"alarm_status": "alarm",
"time": 1640704721540,
"namespace": "AGT.ECS",
"metric_name": "cpu_usage",
"dimension": "instance_id:eee12****3b4c",
"period": 1,
"filter": "Raw data",
"comparison_operator": ">=",
"value": 5,
"unit": "%",
"count": 1,
"alarmValue":
[
{
"time": 1640704680000,
"value": 5.7
}
],
"sms_content": "[CN East-Shanghai1][Major Alarm] Dear hid_1a2b3c: Host monitoring - The original value of the (Agent) CPU utilization of ECS " hecs****6789 "(private IP: 192.168.0.11, public IP: 192.0.2.1, ID: eee12****3b4c) (Agent) is greater than or equal to (>=) 5.00% for one time. Current value: 5.70%. The alarm was triggered at 2021/12/28 23:18:41 GMT +08:00. For more information, visit Cloud Eye.",
"template_variable":
{
"AccountName": "hid_1a2b3c",
"Namespace": "Host monitoring",
"DimensionName": "ECS",
"ResourceName": "hecs****6789",
"MetricName": "(Agent) CPU utilization",
"IsAlarm": true,
"IsCycleTrigger": false,
"AlarmLevel": "Major",
"Region": "CN East-Shanghai1",
"ResourceId": "eee****3b4c",
"PrivateIp": "192.168.0.11",
"PublicIp": "192.0.2.1",
"AlarmRule": "",
"CurrentData": "5.70%",
"AlarmTime": "2021/12/28 23:18:41 GMT+08:00",
"DataPoint":
{
"2021/12/28 23:18:00 GMT+08:00": "5.70%"
},
"DataPointTime":
[
"2021/12/28 23:18:00 GMT+08:00"
],
"AlarmRuleName": "alarm-abc",
"AlarmId": "al1234567890",
"AlarmDesc": "test alarm",
"MonitoringRange": "Resource group",
"IsOriginalValue": true,
"Period": "",
"Filter": "Original value",
"ComparisonOperator": ">=",
"Value": "5.00%",
"Unit": "%",
"Count": 1,
"EventContent": "",
"Link": "https://console.huaweicloud.com/ces/?region=cn-east-3#/alarms/detail?alarmId=al1234567890",
"IsIEC": false,
"IsAgentEvent": false,
"IngressMaxBandwidthPerSec": "",
"EgressMaxBandwidthPerSec": ""
}
},
"unsubscribe_url": "https://console.huaweicloud.com/smn/subscription/unsubscribe?region=cn-east-3®ion_id=cn-east-3&subscription_urn=urn:smn:cn-east-3:1a2b3c4d5e6f:tosls:1a2b3c4d5e6f",
"signing_cert_url": "https://smn.cn-east-3.myhuaweicloud.com/smn/SMN_cn-east-3_1a2b3c4d5e6f7h.pem",
"timestamp": "2021-12-28T15:20:06Z"
}
Field mappings
After a Cloud Eye alert is ingested into Log Service, the alert is converted to an alert that is supported by Log Service by using field mapping. The following example shows the fields of a Log Service alert:
{
"aliuid": "aliuid1",
"alert_instance_id": "1a2b3c4d5e6f7g8h9i",
"alert_id": "al1234567890",
"alert_type": "sls_pub",
"alert_name": "alarm-abc",
"region": "{The region where the project resides}",
"project": "{The project to which Alert Center belongs}",
"project_id": 0,
"next_eval_interval": 1,
"alert_time": 1640704721,
"fire_time": 1640704721,
"fire_results":
[
{
"time": "1640704680000",
"value": "5.7"
}
],
"fire_results_count": 1,
"resolve_time": 0,
"status": "firing",
"results": null,
"labels":
{
"dimension": "instance_id:eee****3b4c",
"dimension_name": "HUAWEI CLOUD ECS",
"metric_name": "cpu_usage",
"namespace": "AGT.ECS",
"region": "CN East-Shanghai1"
},
"annotations":
{
"__config_app__": "sls_pub_alert",
"__pub_alert_app__": "{The ID of the alert ingestion application}",
"__pub_alert_protocol__": "huawei_ces",
"__pub_alert_region__": "{The region of the endpoint to which the alert is sent}",
"__pub_alert_service__": "{The ID of the alert ingestion service}",
"account_name": "hid_1a2b3c",
"comparison_operator": ">=",
"desc": "test alarm",
"title": "[Major Alarm] Cloud Eye Notification: Host monitoring - An alarm is triggered for the (Agent) CPU utilization of ECS "hecs****6789".",
"unit": "%"
},
"severity": 8,
"policy":
{
"alert_policy_id": "{The alert policy that is specified for the alert ingestion application}",
"action_policy_id": "{The action policy that is specified for the alert ingestion application}",
"use_default": false,
"repeat_interval": "{The cycle that is specified for the alert ingestion application}"
},
"template": null,
"drill_down_query": "https://console.huaweicloud.com/ces/?region=cn-east-3#/alarms/detail?alarmId=al1234567890"
}
Log Service | Cloud Eye | Description |
---|---|---|
aliuid | None | The ID of the Alibaba Cloud account to which the alert ingestion application belongs. |
alert_id | message.alarm_id | The ID of the alert monitoring rule. |
alert_instance_id | message_id | The ID of the alert. |
alert_type | None | The type of the alert. Valid value: sls_pub. |
alert_name | message.alarm_name | The name of the alert monitoring rule. |
status | message.alarm_status | The status of the alert. Valid values: firing and resolved.
|
next_eval_interval | message.period and message.count | The interval at which the alert is evaluated.
The value of the next_eval_interval field is calculated by using the following formula: Evaluation interval = message.period × message.count. |
alert_time | message.time | The time when the alert is triggered. |
fire_time | message.time | The time when the first alert is triggered. |
resolve_time | message.time | The time when the alert is cleared.
|
labels | None | The labels of the alert. The following fields are added to the labels field:
|
annotations | None | The annotations of the alert. The following fields are added to the annotations field:
|
severity | message.template_variable.AlarmLevel | The severity level of the alert. The following list describes the mappings between
the alert severity levels in Cloud Eye and the alert severity levels in Log Service:
|
policy | None | The alert policy that is specified for the alert ingestion application. For more information, see Description of the policy variable. |
project | None | The project to which Alert Center belongs. For more information, see Project. |
drill_down_query | message.template_variable.Link | The value is a URL. You can click the URL to go to the details page of the alert rule that triggers the Cloud Eye alert. |