I want to use the logstash ruby plugin to rename a dynamic field name. Specifically I want to strip out dots so I can feed it to Elasticsearch and remove some extra static text
A field name like this
foo.bar.Host11.x.y.uptime => 37
would become
host11_uptime => 37
or even better to split into seperate fields
host => 11
uptime => 37
Here's some general code to loop across fields in ruby. You could then split the field name to create the one (or more) that you wanted.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.