When you create a webhook in Application Real-Time Monitoring Service (ARMS), you can configure the Body parameter. ARMS uses the content of the Body parameter to send alert notifications. The notifications use the format that is used by open source Alertmanager.
Limits
When you create a webhook in ARMS to send alert notifications, take note of the following limits on the Body parameter:
- You can use the
$alertmanager_content
field only in the Body parameter. - Content-Type must be set to application/json.
- You cannot use the
$content
field together with the$alertmanager_content
field. Otherwise, the$content
field does not take effect. - When you test a webhook in the ARMS console, you cannot replace the
$alertmanager_content
field.
For more information about how to use a webhook to send alert notifications, see Create a webhook alert.
Format of alert notifications
The following section describes the format of open source Alertmanager. ARMS sends webhook-based alert notifications in this format. For more information, see the Prometheus documentation.
{
"alerts": [
{
"annotations": {
"_aliyun_arms_alert_value": "15.521240234375",
"_aliyun_arms_alert_message": "null\n Message ID: ac10c42a16124966960554200d2450-7996494\n",
"_aliyun_arms_alert_now_value": "15.521240234375",
"message": "Alert: Namespace: {{$labels.namespace}} / Pod: {{$labels.pod_name}} / Container: {{$labels.container}} Memory usage > 80%, Current value {{ printf \"%.2f\" $value }}%",
"value": "15.521240234375",
"_aliyun_arms_alert_past_value": "15.521240234375"
},
"endsAt": "2021-02-22T07:27:15.404000000Z",
"fingerprint": "bec72890cc2c7b4a027e008df0cd1013",
"labels": {
"container": "kube-state-metrics",
"severity": "warning",
"_aliyun_arms_alert_level": "ERROR",
"instance": "10.0.80.186:10255",
"clustername": "klyz1688-kubernetes-1",
"_aliyun_arms_alert_type": "101",
"_aliyun_arms_integration_name": "Test integration-prometheus",
"alertname": "Container memory usage > 80%",
"_aliyun_arms_userid": "1131971649496228",
"_aliyun_arms_involvedObject_name": "klyz1688-kubernetes-1",
"pod_name": "kube-state-metrics-ccb59dbff-jljg4",
"_aliyun_arms_involvedObject_id": "cb36dcafb9b9340498fad2e1f40b9a254",
"_aliyun_arms_region_id": "cn-hangzhou",
"_aliyun_arms_involvedObject_kind": "cluster",
"_aliyun_arms_product_type": "PROMETHEUS",
"name": "k8s_kube-state-metrics_kube-state-metrics-ccb59dbff-jljg4_arms-prom_359508f3-7e76-4740-b915-41ea48849641_0",
"namespace": "arms-prom",
"_aliyun_arms_integration_id": "80",
"_aliyun_arms_involvedObject_type": "ManagedKubernetes",
"_aliyun_arms_alert_rule_id": "3927051"
},
"startsAt": "2021-02-22T07:18:15.578000000Z",
"status": "firing"
}
],
"commonAnnotations": {
"_aliyun_arms_alert_value": "15.521240234375",
"_aliyun_arms_alert_message": "null\n Message ID: ac10c42a16124966960554200d2450-7996494\n",
"_aliyun_arms_alert_now_value": "15.521240234375",
"message": "Alert: Namespace: {{$labels.namespace}} / Pod: {{$labels.pod_name}} / Container: {{$labels.container}} Memory usage > 80%, Current value {{ printf \"%.2f\" $value }}%",
"value": "15.521240234375",
"_aliyun_arms_alert_past_value": "15.521240234375"
},
"commonLabels": {
"container": "kube-state-metrics",
"severity": "warning",
"_aliyun_arms_alert_level": "ERROR",
"instance": "10.0.80.186:10255",
"clustername": "klyz1688-kubernetes-1",
"_aliyun_arms_alert_type": "101",
"_aliyun_arms_integration_name": "Test integration-prometheus",
"alertname": "Container memory usage > 80%",
"_aliyun_arms_userid": "1131971649496228",
"_aliyun_arms_involvedObject_name": "klyz1688-kubernetes-1",
"pod_name": "kube-state-metrics-ccb59dbff-jljg4",
"_aliyun_arms_involvedObject_id": "cb36dcafb9b9340498fad2e1f40b9a254",
"_aliyun_arms_region_id": "cn-hangzhou",
"_aliyun_arms_involvedObject_kind": "cluster",
"_aliyun_arms_product_type": "PROMETHEUS",
"name": "k8s_kube-state-metrics_kube-state-metrics-ccb59dbff-jljg4_arms-prom_359508f3-7e76-4740-b915-41ea48849641_0",
"namespace": "arms-prom",
"_aliyun_arms_integration_id": "80",
"_aliyun_arms_involvedObject_type": "ManagedKubernetes",
"_aliyun_arms_alert_rule_id": "3927051"
},
"externalURL": "https://alerts.console.aliyun.com/#/alarm/alert/detail/2848",
"groupLabels": {
"alertname": "Container memory usage > 80%"
},
"receiver": "testjiubian",
"status": "firing"
}