Attempt 2: Trying to post data to InfluxDB

I have a synology NAS that I am trying to post HDD temperatures to an influxDB container. The container is working fine and is getting data from two TrueNAS Servers via scripts I didn’t wite - so I am trying to emulate that on the Synology.

Data I have is:

Nas Name: (BackupNAS)
Disk Designation: (sda, sdb etc) - there are 10 disks
Disk Temperature: (34, 35, 36)
I also have a timestamp - but consider to be irrelavent and am happy with the influxdb timestamp - I believe its optional
I am trying to write individually NAS Name, Disk, DiskTemp so I can chart using influxdb or grafana

The command I am using is:

curl -i -XPOST '' \
  	          --header 'Authorization: Token YaddaYaddaYadda==' \
			  --data-binary 'server=BackupNAS,disk=$var value=$disk_temp'

But I am getting as a result:

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.6.1
X-Platform-Error-Code: invalid
Date: Fri, 10 Mar 2023 00:18:28 GMT
Content-Length: 109

{"code":"invalid","message":"unable to parse 'server=BackupNAS,disk=$var value=$disk_temp': invalid boolean"}

Its clear that I don’t understand how the data should be formatted and written. Can anyone correct me?

What is this script? Can you post here? Maybe it is simple enough that Telegraf or NodeRED would work.

is getting data from two TrueNAS Servers via scripts I didn’t wite"

I probably shouldn’t post the script as I haven’t written it.
But I can link to another forum - you are looking for post 60

As for my script - on the third line I had to change the ’ for " and it works. It still generates an error (below) but there is data in influxdb.

HTTP/1.1 204 No Content
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.6.1
Date: Fri, 10 Mar 2023 03:00:41 GMT

Now I shall tidy it up with some environment variables - assuming I can get that to work

I have no idea what that script does, so probably will give up here.

I did come across this, which may help (if you have not already gone through it).

The script I linked to just takes a snapshot of all the HDD’s and SSD’s on a TrueNAS Scale or Core box and posts those to InfluxDB. Its written in perl and I have no idea what some of the lines even mean