fluent-plugin-influxdb icon indicating copy to clipboard operation
fluent-plugin-influxdb copied to clipboard

Adding keys remapping functionality

Open gszadkow opened this issue 9 years ago • 4 comments

The data provider gives us the set of generic key-value pairs. There is a need to have the keys remapped so that communication with applications relying on the influxdb and different key names is not broken

gszadkow avatar Oct 18 '16 12:10 gszadkow

Sorry for the delay.

You can set tag_keys to tell which values are tag. What is the merit of using tag_keys and keys_mapping combination?

repeatedly avatar Nov 07 '16 19:11 repeatedly

@repeatedly, I.e. user pushes to Fluentd "someField", but InfluxDB expects that field would be just "Field". In this case keys_mapping could be used to transform "someField" to "Field".

Also I hope @gszadkow will provide some tests and example (for readme file).

Jimilian avatar Nov 30 '16 08:11 Jimilian

For such cases, users can use rename_key or record_transformer/record_modifier plugins to rename fields.

repeatedly avatar Dec 06 '16 19:12 repeatedly

record_transformer/record_modifier are filters as I understand, the config structure is:

  • filter 1
  • match A -- store C keys x y z -- store D keys remapped x->a, y->b, z->c
  • filter 2
  • match B -- store C keys x y z -- store D keys remapped x->a, y->b, z->c

But we need to do different remapping within the same match for different stores So remapping need to be done between the stores in the same match, not between the matches, where we can use the filters.

We cannot have

  • match A
  • filter
  • match A (again)

gszadkow avatar Feb 17 '17 10:02 gszadkow