Skip to content

Instantly share code, notes, and snippets.

@jinuljt
Created January 27, 2021 09:46
Show Gist options
  • Save jinuljt/7aa47125878180ce1314faa3591707d3 to your computer and use it in GitHub Desktop.
Save jinuljt/7aa47125878180ce1314faa3591707d3 to your computer and use it in GitHub Desktop.
logstash.md
## filter 坑
已知有field {"host": "<ip>"}
想要转换为:
{"host": {"ip": "<ip>", "name": "<hostname>"}
以下方法都失败了,改用 {"new_host": {"ip": "<ip>", "name": "<hostname>"} 可以成功。应该是重用field会继承之前的类型导致的。目前没找到方案。
- mutate rename/add_field
- ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment