1

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
ollybee
  • 147
  • 5

1 Answers1

1

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.

Community
  • 1
  • 1
Alain Collins
  • 16,268
  • 2
  • 32
  • 55