force measurement value to type float before writing to db
whole number values (such as 0) are json decoded as type int If the value field is first written to InfluxDB as type int (example: 0) and later as type float (example 0.123), InfluxDB throws a "field type conflict" exception. Forcing all data to type float fixes. Change-Id: Ifc139bbc67077137501ffe9045a988b8afc393e4
This commit is contained in:
parent
37832f8477
commit
e87fbe3971
@ -526,7 +526,7 @@ class MetricPersister(AbstractPersister):
|
||||
time_stamp = metric['timestamp']
|
||||
LOG.debug('timestamp %s', time_stamp)
|
||||
|
||||
value = metric['value']
|
||||
value = float(metric['value'])
|
||||
LOG.debug('value: %s', value)
|
||||
|
||||
if 'value_meta' in metric and metric['value_meta']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user