Hi,
we use below query to send data to influxdb1.8
curl -vvv -s -i -XPOST ‘http://hostname:8086/write?db=ipmi&precision=s ’ --data-binary @/tmp/final
Can anyone please help me what changes need to be done in the above query to send data to Influxdb2.6
I have tried adding token, org name, id. but it did not work and getting authorization failed error
grant1
April 27, 2023, 9:53am
2
I have not tried to do this, but maybe this?
curl --request POST \
"http://localhost:8086/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=ns" \
--header "Authorization: Token YOUR_API_TOKEN" \
--header "Content-Type: text/plain; charset=utf-8" \
--header "Accept: application/json" \
--data-binary '
airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
'
This should help: