I have this error when I try to insert a point containing an integer field or a string field.
auto db = influxdb::InfluxDBFactory::Get("http://127.0.0.1:8086?db=MY_TEST_DB");
db->createDatabaseIfNotExists();
db->write(influxdb::Point{"cpu"}.addField("value", 5));
// db->write(influxdb::Point{"cpu"}.addField("value", "5")); // <-- or with a string
terminate called after throwing an instance of 'influxdb::InfluxDBException'
what(): Request failed: (400) Bad Request
Aborted (core dumped)
I don't know what's causing it, all I can say is that I can correctly fetch data or insert double values in the database.
I'm using :
influxdb-cxx 0.7.1
cpr 1.10.4
influxdb 1.8.10
gcc/g++ 11.4.0
cmake 3.22.1
- in a
Kubuntu 22.04.3 Virutal Machine
Thanks in advance for your help.