分页查询 Agent 离线通知记录,支持按主机、Agent ID、通知状态和时间范围过滤,用于确认离线告警发送结果;筛选条件不传时查询全部可见记录,时间字段为秒级 Unix 时间戳。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | GetOfflineNotificationList | 要执行的操作,取值:GetOfflineNotificationList。 |
Version | String | 是 | 2024-05-08 | API的版本,取值:2024-05-08。 |
AgentId | String | 否 | agent-id-001 | Agent ID,可从主机资产列表获取;不传时不按 Agent 过滤 |
CloudProviders | Array of String | 否 | ["cloud-providers-id-001"] | CloudProviders 列表;不传时不按该字段筛选 |
Hostname | String | 否 | host-001 | 主机名称 |
Ip | String | 否 | 192.0.2.10 | IP 地址 |
Platforms | Array of String | 否 | ["linux"] | 操作系统平台列表,例如 linux、windows;不传时不限制平台 |
Tags | Array of String | 否 | ["production"] | Tags 列表;不传时不按该字段筛选 |
LeafGroupIDs | Array of String | 否 | ["group-id-101"] | 叶子分组 ID 列表,可从多级分组查询接口获取;不传时不限制分组 |
PageNumber | Long | 是 | 1 | 翻页页码 |
PageSize | Long | 是 | 10 | 每页的大小 |
Regions | Array of String | 否 | ["cn-beijing"] | Regions 列表;不传时不按该字段筛选 |
SortBy | String | 否 | LastHeartbeatTime | 排序字段 |
SortOrder | String | 否 | Desc | 排序顺序
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Data | Array of Object | -- | 分页业务数据,具体元素结构见各接口响应声明 |
PageNumber | Long | 1 | 当前页面 |
PageSize | Long | 20 | 页面大小 |
TotalCount | Long | 1 | 全部数据条数 |
POST /?Action=GetOfflineNotificationList&Version=2024-05-08 HTTP/1.1 Host: seccenter.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20241120T080538Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241120/cn-beijing/seccenter/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "AgentId": "agent-id-001", "CloudProviders": [ "cloud-providers-id-001" ], "Hostname": "host-001", "Ip": "192.0.2.10", "LeafGroupIDs": [ "group-id-101" ], "PageNumber": 1, "PageSize": 10, "Platforms": [ "linux" ], "Regions": [ "cn-beijing" ], "SortBy": "LastHeartbeatTime", "SortOrder": "Desc", "Tags": [ "production" ] }
{ "ResponseMetadata": { "RequestId": "20241120165538010234567890", "Action": "GetOfflineNotificationList", "Version": "2024-05-08", "Service": "seccenter", "Region": "cn-beijing" }, "Result": { "Data": [ { "AbnormalPluginsList": "collector: offline", "AccountID": "account-id-001", "AgentID": "agent-id-001", "AgentOfflineTime": 1786492800, "AgentStatus": "online", "ClientPublicIP": "192.0.2.10", "CloudProvider": "volcengine", "CpuUsage": 0.95, "Dns": "DNS", "EcsInstance": { "AccessKey": "AKLTEXAMPLE001", "AccountID": "account-id-001", "Cpu": 1, "CreatedAt": "2024-05-08T10:00:00Z", "ECSUpdateAt": "2024-05-08T10:00:00Z", "EipAddress": "192.0.2.10", "HostName": "host-001", "IPList": [ "192.0.2.10" ], "InstanceName": "example-name", "Mem": 1, "OsName": "veLinux 1.0 64位", "OsType": "veLinux", "Platform": "Linux", "PlatformVersion": "1.0", "PrimaryIpAddress": "192.0.2.10", "Region": "cn-beijing", "SecurityEnhancementStrategy": "security-enhancement-strategy-sample", "Status": "RUNNING", "Visibility": "visibility-sample", "VpcId": "vpc-id-001", "VpcName": "example-name", "ZoneId": "cn-beijing-a" }, "FirstHeartbeatTime": 1786533780, "Gateway": "192.0.2.1", "Group": "default-group", "GroupPath": "/group1/group2", "GroupPathEn": "/group1/group2", "KernelVersion": "1.0.0", "LastHeartbeatTime": 1786533780, "MemUsage": 0.95, "NotificationThreshold": 60, "NotificationTime": 1786496400, "OldValidCode": 1, "Online": true, "Platform": "linux", "PlatformVersion": "linux", "PluginsBriefInfo": "collector 1.0.0 online", "PluginsStatus": "all_online", "Reason": "example reason", "Risk": { "Alarm": 1, "Baseline": 1, "RealRiskVul": 1, "Virus": 1, "Vuln": 1 }, "SecurityEnhancement": true, "StartTime": 1786533780, "State": "success", "StateDetail": "success", "Status": "Protecting", "Tags": [ "production" ], "TotalMem": 8589934592, "UserStatus": "start_succeed", "UserStatusReason": "success", "UserStatusReasonCode": 0 } ], "PageNumber": 1, "PageSize": 20, "TotalCount": 1 } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
400 | MissingParameter | 请求参数缺失,请检查参数是否已正确传入。 |
400 | InvalidParameter | 请求参数错误,请检查参数传递内容是否正确。 |
400 | OperationDenied | 不允许的操作,请检查当前资源是否被占用 |
500 | InternalError | 服务器内部错误,请稍后重试或联系技术支持。 |
500 | DBOperateError | 数据库操作异常,请稍后重试或联系技术支持。 |