Viewing edge data with influxdb example

Have done “How to visualize your data at the edge…” tutorial on 2 devices. Both fail in being able to write to the influxdb from the edge workflow, yet if I create a curl command line I can write to it with no problems. Is it possible the guide was written so long ago something has changed? Error in the influxdb docker log is:

ts=2023-05-29T21:38:13.001994Z lvl=info msg=Unauthorized log_id=0i6LghfW000 error=“authorization not found”

This I can search on. The authorization token is correct, Like I said when I do a curl (below) it writes just fine.:

curl --request POST **
http://localhost:8086/api/v2/write?org=Prodigy&bucket=environmental-data&precision=ns” **
–header “Authorization: Token [Redacted]” **
–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

Thanks!

Hi @David_MacKenzie !

Thanks for the report. Give me a bit to review this guide and see if anything needs to be updated. I’ll let you know what I find.

Thanks for your patience. I went through the guide and was able to publish data to a local influxDB container using the steps provided.

Since your token is working in a curl request, I would check to make sure the Body Template of your HTTP node is structured properly. If you follow the guide, and set the Result Paths of your Random Number Nodes to data.temperature and data.humidity, your Body Template should read as:

device,id={{deviceId}} temp={{data.temperature}},humidity={{data.humidity}}

I suggest double checking that. Let me know if you continue to have problems.

Also, I’ve edited your post to remove your API token. For security reasons, I strongly suggest you delete and re-create this influxDB API token since it’s been posted online.

Thanks for doing that. I think the problem was permissions related. I did the steps where you shouldn’t have to use sudo to launch things or so I thought at least. I just redid the container creations with sudo and I got it to work (on an iMac no less). Thanks