查询数据库Agent列表
功能介绍
查询数据库Agent列表
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v3/{project_id}/audit/{instance_id}/agents
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
参数解释: 项目ID。可通过IAM服务[查询指定IAM用户的项目列表]接口获取。 约束限制: 不涉及 取值范围: 以IAM服务接口返回值为准,字符长度32-64。 默认取值: 不涉及 |
|
instance_id |
是 |
String |
参数解释: 实例ID。可通过查询实例列表接口ID字段获取 约束限制: 不涉及 取值范围: 以查询实例列表接口值为准,字符长度32-64。 默认取值: 不涉及 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
db_id |
是 |
String |
参数解释: 数据库ID, 可在查询数据库列表接口ID字段获取。 约束限制: 不涉及 取值范围: 以查询数据库列表接口值为准,字符长度16-64。 默认取值: 不涉及 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。 通过调用IAM服务查询用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 不涉及 取值范围: IAM服务查询用户Token接口为准 默认取值: 不涉及 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
agents |
Array of agents objects |
agent列表 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
agent_id |
String |
agent ID |
|
agent_type |
String |
agent 类型 |
|
agent_os |
String |
agent OS |
|
agent_ip |
String |
agent安装节点IP |
|
mem_threshold |
Integer |
内存阈值 |
|
cpu_threshold |
Integer |
cpu阈值 |
|
status |
Integer |
agent状态 |
|
agent_nic |
String |
agent网卡 |
|
db_name |
String |
数据库名称 |
|
datacap_status |
Integer |
数据流量抓取状态 |
|
agent_url |
String |
agent安装地址 |
|
universal |
Boolean |
是否CCE场景 |
|
sha256 |
String |
sha256值 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
状态码:403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
请求示例
/v3/{project_id}/audit/{instance_id}/agents
响应示例
状态码:200
成功
{
"agents" : [ {
"agent_id" : "X1miCo8BDdIO3rwSbhug",
"agent_type" : "DB",
"agent_os" : "LINUX64_X86",
"agent_ip" : "2407:c080:11f0:23b:59d5:7ddf:5650:447b",
"agent_nic" : "",
"cpu_threshold" : 80,
"mem_threshold" : 80,
"db_name" : "",
"status" : 1,
"datacap_status" : 1,
"agent_url" : "/opt/dbss_audit/audit_server/agent/",
"universal" : false,
"sha256" : "2619a4fc8ff3b3dda48c4347630bc8d7ece2e1f046eab7ac044e7d0df49886e3"
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
成功 |
|
400 |
请求参数错误 |
|
403 |
认证失败 |
|
500 |
服务器内部错误 |
错误码
请参见错误码。