Syslog5424Reader Controller Service
描述
提供一种机制,用于读取符合 RFC 5424 的 Syslog 数据(例如日志文件)并构建数据以便对其进行处理。
标签
属性
| 名称 | 默认值 | 可选值 | 描述 |
|---|---|---|---|
| Character Set | UTF-8 | 指定 Syslog 消息的字符集 | |
| 原始消息 | false |
| 如果为 true,记录将包含一个 _raw 字段,其中包含原始消息 |
状态管理
该组件不存储状态。
受限 (Restricted)
该组件不受限。
提供的 Service API
RecordReaderFactory
详细说明
Syslog5424Reader
Syslog5424Reader Controller Service 提供了一种解析合法的 RFC 5424 Syslog 消息的手段。 该服务生成的记录使用固定 schema,以匹配规范要求。
该服务的必需属性名为 Character Set,用于指定传入文本的字符集。
Schema
从传入数据解析记录时,记录会被解析为 RFC 5424 schema。
RFC 5424 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",
{
"type": "long",
"logicalType": "timestamp-millis"
}
]
},
{
"name": "hostname",
"type": [
"null",
"string"
]
},
{
"name": "body",
"type": [
"null",
"string"
]
},
{
"name": "appName",
"type": [
"null",
"string"
]
},
{
"name": "procid",
"type": [
"null",
"string"
]
},
{
"name": "messageid",
"type": [
"null",
"string"
]
},
{
"name": "structuredData",
"type": [
"null",
{
"type": "map",
"values": {
"type": "map",
"values": "string"
}
}
]
}
]
}