[QUESTION]: processor_split_char SourceKey 无法使用tags数据中log.file.path信息 #2130
-
Before asking a question, please first consider:
输出到Kafka信息如下
yaml文件:enable: true
目标我需要解析文件路径中IP地址(192.168.11.12)和应用名称(java-test) |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
可以查看我们的日志协议,上述需求的字段是在tags中的:https://open.observability.cn/project/ilogtail/developer-guide-log-protocol-protocol-spec-sls/#_top 目前的processor都还不支持直接处理tags |
Beta Was this translation helpful? Give feedback.
-
你好,是否可以将tags数据,写入contexts里呢? |
Beta Was this translation helpful? Give feedback.
-
文件路径实际上是保存在contents里的,可以试一下“tag:path”字段,但是ip保存的位置确实无法获取。看到您用的kafka插件,或许可以用这个来看看(这个是输出测打平了,但是processor还是处理不了的): |
Beta Was this translation helpful? Give feedback.
-
你好,2.0.7 contents 没有"tag:path "字段 |
Beta Was this translation helpful? Give feedback.
-
解决了吗?我也有这个需求,想从file path 提取渠道信息,processer看文档,SourceKey只能是content,content里没有文件路径 |
Beta Was this translation helpful? Give feedback.
-
@Abingcbc 这个或许他比较清楚一些 |
Beta Was this translation helpful? Give feedback.
-
对于Tag的处理,目前有两种方法:
|
Beta Was this translation helpful? Give feedback.
对于Tag的处理,目前有两种方法: