logstash-plugins / logstash-output-influxdb

Apache License 2.0
58 stars 79 forks source link

Run "db" parameter through event.sprintf() to support substitutions in the database name #31

Closed mikelaws closed 8 years ago

mikelaws commented 8 years ago

Using the pr/29 branch, it appears that the db configuration parameter does not support event field substitution, causing a configuration like:

db => "%{customer}_%{region}_%{environment}"

to log a URI format exception, and fail flushing the stud/buffer due to the resulting URI:

http://localhost:8086/write?db=%{customer}_%{region}_%{environment}&rp=default&precision=ms&u=user&p=pass

Supporting this would better align the behavior of this output plugin with the majority of other Logstash output plugins (and would be hugely appreciated).

suyograo commented 8 years ago

Fixed in #33