Standard integration
This topic describes how to use the standard integration solution.
Introduction
Standard integration is a standard monitoring integration Application Programming Interface (API) from Event Center. It supports custom scenarios. You can push anomaly alerts in the standard integration data format. This triggers alerts or events through event streaming rules for unified operations management. Follow the steps below to complete the integration.
How to set up standard integration
Step 1: Find the standard integration source
Go to Event Center > Integration Center > Integration Configuration. Find the standard integration source, then go to the Add Integration page. Follow the steps on the page to complete the integration.
Step 2: Configure the alert push URL
Obtain the push URL that contains the integration key from the console.
https://public-alert.aliyuncs.com/event/standard/{integration_key}The integration key in the URL is the identifier for this standard integration.
Step 3: Push alert records in the standard integration data format
Push the anomaly alert records from your custom scenario to the URL. The records must be in the standard integration data format.
Step 4: Confirm the integration
After you complete the configuration, click the Confirm Integration button below the integration key to finish the setup.
Step 5: Verify the integration
Configure alerts and subscription rules for the standard integration, and then trigger an alert. Go to the Integration Configuration page. The integration is successful if the status of the standard integration source is Accepted.
Standard integration data format
Standard integration currently supports only the POST method for integration. Other connection types, such as GET and Push, will be available in the future.
Configure log pushes using the following JSON format. This ensures that all alert fields can be configured through event streaming rules. For more information, see the Push alert records to standard integration using a script on an ECS instance best practice.
{
"summary":"Cpu_util at 85.16% on machine 112.11.123.11",
"priority":"P1",
"name":"CPU usage exceeded warning",
"timestamp":"2021-07-17T08:42:58.315+0000",
"region":"shanghai",
"source":"112.11.123.11",
"application":"zheda/mozi",
"group":"Online",
"class":"Load",
"details":{
"freeSpace":"1%",
"pingTime":"1500ms",
"loadAvg":"0.75"
},
"tags":"{}"
}The following table describes the fields.
Field | Log field | Description | Required | Character type | Example |
Alert summary | summary | A summary of the event's alert record. | Required | String | Example: "Cpu_util at 85.16% on machine 112.11.123.11" Format: {metric} at {value} on {alert object} |
Priority | priority | Priority level of the event. | Required | String | Example: {P1/P2/P3/P4} |
Alert name | name | Name of the event (name of the metric). | Optional | String | Example: Cpu_usage; Usage exceeded warning |
Alert time | timestamp | Timestamp | Required | String | Example: '2018-04-08T00:00:00Z' |
Alert region | region | Product fields by region | Optional | String | Example: shanghai / zhejiang ... |
Alert object | source | The object that triggered the event alert, such as a host ID or hostname. | Required | String | Example: machine 112.11.XXX.XX (hostID) or {hostname...} |
Group | group | The group or cluster of the alert object. | Optional | String | Example: Groups such as daily, pre-release, or online. |
Associated Applications | application | The affected application system. | Optional | String | Example: Zheda/Mozi... |
Alert category | class | The metric type corresponding to the event. | Optional | String | Example: CPU / Load / DiskIO ... |
Alert details | details | Details of the event content. | Required | String | Example: {"free space": "1%", "ping time": "1500ms", "load avg": 0.75 } |
Extension field | tags | An extension field. | Optional | String | Supports user-defined extension fields. |