Replies: 4 comments 3 replies
-
这是一个使用的说明是吧? 后面定稿后可以正式提交到文档里。 上文结构是不是可以调衡为两部分: 2、直接环境变量设置topic,需要打开enable_env_ref_in_config,社区版是可以直接打开的,可以在overwrite_community_edition_flags中修改下,提交个pr |
Beta Was this translation helpful? Give feedback.
1 reply
-
请问 enable_env_ref_in_config 这个是在哪里打开呢? 我使用的版本是1.3.1 没有找到哇 |
Beta Was this translation helpful? Give feedback.
1 reply
-
是这个里面增加 { "enable_env_ref_in_config":true } 吗? 我使用后 好像并不行 |
Beta Was this translation helpful? Give feedback.
1 reply
-
pr #746 已经将enable_env_ref_in_config默认开启 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
需求
flusher的动态topic表达式支持从环境变量中读取值替换。
涉及组件
kafka、pulsar、elasticsearch等支持动态topic或者动态索引的flusher组件
用户场景
用户自定义的环境变量可以追加
这样配置后保证方式环境变量_app_被追加到日志中
通过processor_add_fields processor提取的变量同样也可以添加到日志内容中。
配置使用方式
${env_name}
(对于采用$
的表达是直接识别为系统变量获取),它的好处是不需要把标签数据带入日志存储,例如使用ilogtail去采集kafka、zk等大数据组件日志式,用户可能是基于一类组件建立了一个topic做日志推送,环境变量值仅仅是做topic区分,环境变量值并无存储需求。这种方式的实现只需要读取系统变量,然后从动态表达式里替换掉即可,和fluent-bit、filebeat使用基本一致Beta Was this translation helpful? Give feedback.
All reactions