Updated on 2023-06-19 GMT+08:00

Configuring alert config

Function

Configuring alert config

URI

POST /v2/{project_id}/warnalert/alertconfig/update

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

poject id

Minimum: 32

Maximum: 64

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

token

Minimum: 32

Maximum: 2097152

Content-Type

Yes

String

Content-Type请求头

Default: application/json;charset=utf8

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

display_name

Yes

String

display name of alert config

topic_urn

Yes

String

topic urn

warn_config

Yes

WarnConfig object

告警配置信息。

Table 4 WarnConfig

Parameter

Mandatory

Type

Description

antiDDoS

Yes

Boolean

DDoS攻击

back_doors

No

Boolean

网页后门

bruce_force

No

Boolean

暴力破解(系统登录,FTP,DB)

high_privilege

No

Boolean

数据库进程权限过高

remote_login

No

Boolean

异地登录提醒

send_frequency

No

Integer

取值范围:

  • 0:表示每天一次

  • 1:表示半小时一次

对于HID必选。

waf

No

Boolean

保留字段

weak_password

No

Boolean

弱口令(系统,数据库)

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Internal error code

error_msg

String

Internal error description

Example Requests

{
  "display_name" : "",
  "topic_urn" : "8",
  "warn_config" : {
    "antiDDoS" : false,
    "back_doors" : false,
    "bruce_force" : false,
    "high_privilege" : false,
    "remote_login" : false,
    "send_frequency" : 10,
    "waf" : false,
    "weak_password" : false
  }
}

Example Responses

Status code: 200

OK

{
  "error_code" : "10000000",
  "error_msg" : "Ok",
  "task_id" : ""
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.