yandex / yandex-tank

Load and performance benchmark tool
Other
2.44k stars 280 forks source link

Field type conflict when write monitoring data to InfluxDB #776

Open MasterS77 opened 5 years ago

MasterS77 commented 5 years ago

Field type conflict when write monitoring data to InfluxDB. Error can be reproduced on different metrics (cpu, memory).

Example of error with trace:

<class 'influxdb.exceptions.InfluxDBClientError'>: 400: {"error":"partial write: field type conflict: input field \"Memory_buff\" on measurement \"monitoring\" is type float, already exists as type integer dropped=1"}

  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 386, in run
    self.retcode = self.core.wait_for_finish()

  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 289, in wait_for_finish
    retcode = plugin.is_test_finished()

  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Telegraf/plugin.py", line 226, in is_test_finished
    data_len = self.monitoring.poll()

  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Telegraf/collector.py", line 120, in poll
    self.send_collected_data()

  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Telegraf/collector.py", line 144, in send_collected_data
    listener.monitoring_data(copy.deepcopy(data))

  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/InfluxUploader/plugin.py", line 82, in monitoring_data
    for chunk in chop(data_list, self.get_option("chunk_size"))

  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/InfluxUploader/plugin.py", line 88, in _send_monitoring
    's'

  File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 490, in write_points
    tags=tags, protocol=protocol)

  File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 551, in _write_points
    protocol=protocol

  File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 327, in write
    headers=headers

  File "/usr/local/lib/python2.7/dist-packages/influxdb/client.py", line 286, in request
    raise InfluxDBClientError(response.content, response.status_code)

YandexTank/1.12.3 Telegraf 1.11.4 InfluxDB shell version: 1.7.7

lebovski commented 5 years ago

The same problem

Alpherie commented 4 years ago

Same problem. Has anyone found any workarounds?

Ezhvtumane commented 4 years ago

Same problem. Has anyone found any workarounds?

The same... I just put telegraf to host where I wanna take a metrics. Start/finish telegraf manualy and write logs to file [[outputs.file]]. After the test is over, I download logs to my laptop and write to influxdb manualy. I think that it can be automate, just add some scripts. This workaround is boring but it's working.