获取日志字段 API

最后更新于:

该API返回EventLog Analyzer中已处理日志的解析日志字段列表。日志字段可用于创建搜索查询。

请求网址

GEThttp://hostname:8095/RestAPI/v1/meta/log_fields

请求头

标题名称 必填 描述
授权 持有人 {{AuthToken}} API设置页面生成的认证令牌。

例如:
Bearer
mdrkoda0odmtmznloc00ndziltg0mgutmwzkztljmjvmzwmx

响应

响应将是一个包含字段列表的 JSON 对象。

参数名称 描述
字段 字段的JSON数组

使用cURL的示例用法

请求示例

复制到剪贴板

curl --location --request GET 'http://localhost:8095/RestAPI/v1/meta/log_fields' \ -H "Accept: application/json" -H "Authorization: Bearer mdrkoda0odmtmznloc00ndziltg0mgutmwzkztljmjvmzwmx "

示例响应:

复制到剪贴板

{ "fields": [ { "description": "严重性", "id": "SEVERITY" }, { "description": "设施", "id": "FACILITY" }, { "description": "来源", "id": "SOURCE" }, { "description": "事件名称", "id": "IENAME" }, { "description": "用户名", "id": "USERNAME" } ] }

使用Postman(第三方工具)的示例用法

Get log sources API