SyslogReader Controller Service
描述
尝试根据 RFC5424 和 RFC3164 解析 Syslog 消息的内容。 对于 RFC5424 格式的消息,不支持结构化数据,并将作为消息的一部分返回。注意:请注意,RFC3164 是信息性的,并且存在多种不同的实现。
标签
属性
| 名称 | 默认值 | 可选值 | 描述 |
|---|---|---|---|
| Character Set | UTF-8 | 指定 Syslog 消息的字符集 | |
| 原始消息 | false |
| 如果为 true,记录将包含一个 _raw 字段,其中包含原始消息 |
状态管理
该组件不存储状态。
受限 (Restricted)
该组件不受限。
提供的 Service API
RecordReaderFactory
详细说明
SyslogReader
SyslogReader Controller Service 提供了一种解析 Syslog 消息内容的手段, 兼容 RFC5424 和 RFC3164 格式。该 Reader 生成的记录使用固定 schema, 以匹配两个规范中的公共字段集合。
该服务的必需属性名为 Character Set,用于指定传入文本的字符集。
Schema
从传入数据解析记录时,记录会被解析为通用 Syslog Schema(Generic Syslog Schema)。
通用 Syslog Schema
{
"type": "record",
"name": "lynxusRecord",
"namespace": "cn.org.acal.lynxus",
"fields": [
{
"name": "priority",
"type": [
"null",
"string"
]
},
{
"name": "severity",
"type": [
"null",
"string"
]
},
{
"name": "facility",
"type": [
"null",
"string"
]
},
{
"name": "version",
"type": [
"null",
"string"
]
},
{
"name": "timestamp",
"type": [
"null",
"string"
]
},
{
"name": "hostname",
"type": [
"null",
"string"
]
},
{
"name": "body",
"type": [
"null",
"string"
]
}
]
}