I have a simple kapacitor script to move data from a local influxdb up to a cloud instance of influx.
dbrp "stage_health"."weekly"
batch
|query('''
SELECT *
FROM stage_health.weekly.config
''')
.every(1m)
.period(1m)
.offset(30s)
.groupBy(*)
// Write to the cloud
|influxDBOut()
.cluster('cloud')
.database('prod_stage_health')
.retentionPolicy('autogen')
.measurement('config')
.tag('stage', '1')
.tag('vec', '13')
But I have been getting the following error message in the kapacitor log.
ts=2018-09-13T14:02:01.064Z lvl=error msg=“failed to write points to InfluxDB” service=kapacitor task_master=main task=config node=influxdb_out2 err=“write failed: partial write: field type conflict: input field “status” on measurement “config” is type float, already exists as type integer dropped=1”
The schema for the config measurement in both databases is as follows:
> show field keys from weekly.config
name: config
fieldKey fieldType
-------- ---------
count integer
expectedversion string
profiles string
status integer
version string
> show field keys from config
name: config
fieldKey fieldType
-------- ---------
count integer
expectedversion string
profiles string
status integer
version string
So… I’m rather confused about why kapacitor is complaining about a type conflict. Any ideas?