アラートルールの更新
アラートルールを取得するには、以下の API を使用します。
リクエスト URL
ヘッダー
ヘッダーキー:Authorization
ヘッダー値:Bearer {{access_token}} (SixthSenceポータルで [設定] > [アクセストークン] > [アクセストークンを表示] に移動)
リクエスト
{
"aggregationType": "APDEX",
"aggregationValue": 0,
"channels": [
"string"
],
"instances": [
{
"key": "string",
"value": "string"
}
],
"operation": "EQ",
"period": 0,
"recoveryPeriod": 0,
"ruleName": "string",
"silencePeriod": 0,
"thresholdDisplayUnit": "string",
"thresholdDisplayValue": "string"
}
パラメータ | 内容 |
---|---|
ruleId | アラートルールのID |
例:
{
"ruleName": "Error count for code 401 greater than 1 for more than or equal to a count of 1 in a period of 5 mins",
"aggregationType": "SUM",
"aggregationValue": 0,
"period": 5,
"thresholdDisplayValue": "1",
"thresholdDisplayUnit": "na",
"operation": "GT",
"silencePeriod": 5,
"recoveryPeriod": 0,
"channels": [
"4KuExIUBVVmCg9TvYqE3"
]
}
応答
{
"data": {},
"message": "string",
"success": true
}
例:
{
"message": "Alert updated successfully.",
"success": true,
"data": {
"ruleId": "YTMwNDI2YWItMWU3MC00ODQyLTgwOTItZWY4YzI2YTg3YjMzXzE2NzQwMzkyODg3Njc=",
"ruleName": "Error count for code 401 greater than 1 for more than or equal to a count of 1 in a period of 5 mins",
"metricDisplayName": "Error code",
"aggregationType": "SUM",
"aggregationValue": 0,
"period": 5,
"thresholdDisplayValue": "1",
"thresholdDisplayUnit": "na",
"operation": "GT",
"silencePeriod": 5,
"recoveryPeriod": 0,
"serviceId": "eyduYW1lJzonbm9kZS1hcHAtMicsJ3RlYW1JRCc6JzU5ZWRkZDE1LTIwMjQtNDA1OS05OGFlLTc5YTJjZTViYTEzNCcsJ3R5cGUnOidBJ30=.1",
"channels": [
"4KuExIUBVVmCg9TvYqE3"
],
"filters": [
{
"key": "service_error_code",
"value": "401"
}
],
"instances": [
{
"key": "endpoint",
"value": "http://www.google.com"
}
]
}
}