logstash-plugins / logstash-output-influxdb

Apache License 2.0
58 stars 79 forks source link

coerce_values issue #88

Open vitcon-iot opened 4 years ago

vitcon-iot commented 4 years ago

Please post all product and debugging questions on our forum. Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.

For all general issues, please provide the following details for fast resolution:

173 db => "xxxxx" 174 host => "xxxxx" 175 measurement => "%{[sensor][prefix]}.%{[sensor][key]}" 176 user => "xxxxx" 177 password => "xxxxx" 178 port => "xxxxx" 179 send_as_tags => ["gatewayId"] 180 data_points => { 181 "hostname" => "%{[host]}" 182 "gatewayId" => "%{[gatewayId]}" 183 "status" => "%{[sensor][value]}" 184 } 185 coerce_values => { 186 "status" => "%{[sensor][coercetype]}" 187 } 188 } 189 }

- Sample Data: this is std output--- debug "host" => "xxx", "type" => "xxxx", "sensor" => { "value" => 17.1, "key" => "30AEA4C519C9-temperature_f-1", "sensortype" => "f", "coercetype" => "float", "prefix" => "series", "time" => 1581066461321

warnnning message [2020-02-11T20:11:26,421][WARN ][logstash.outputs.influxdb][main] Don't know how to convert to %{[sensor][coercetype]}. Returning value unchanged [2020-02-11T20:11:26,834][WARN ][logstash.outputs.influxdb][main] Don't know how to convert to %{[sensor][coercetype]}. Returning value unchanged

influxdb field type fieldKey fieldType


hostname string status string

Hello I used coerce_values ​​because I want to dynamically give field type per measurement A warning has occurred as shown below. Have I missed anything? Is the grammar wrong?