Ok, so you’re trying to pull ipmi data and put it into influx. I see multiple problems with the line feed protocol in this example.
commas are key characters in influx.
Please read Error Messages | InfluxDB OSS 1.3 Documentation
You can simply leave off the word insert when using the /write api
For spaces in your measurement or tags, try putting back slashes before the spaces in your tags or field keys. I.E. Inlet\ Amb\ Temp
I believe this is what you should be doing:
curl -i -XPOST http://localhost:8086/write?db=stemp --data-binary “Room_Temp,host=HP_ML150 Inlet\ Amb\ Temp=sudo ipmitool -c sensor reading “Inlet Amb Temp””
But this will still have a problem because the value after the = sign should only be the 22, and not “Inlet Amb Temp,22”
You’ll need to use a text processor like awk, or grep, etc, to strip off that first part of the return from the ipmitool, so that the only thing you get back is the value.
You can add some other tags into the insert like hostname=xxxxxxxxx, and just put the dnsName of the server in place of xxxxxxxxxxx. This will just give another way to pull the data instead of only using host=HP_ML150. What if one day there are 2 HP_ML150 servers?
Thanks for the reply, I`m thinking maybe just save as overwriiten text file then run cat sed parse the value into influx, not efficient but…
Any other ideas would be wellcome. Thanks for the input.
Please take a little bit of time and review what I provided. It was not provided with the expectation that a copy +paste would work.
Reviewing that error, it’s because the sudo ipmitool blah blah blah command was not in quotes, therefor, was not executed.
But, as I said in the last post, even if it was, you’d need to strip out the first part, so that you have a command that only returns the number 22. Once you have that, simply provide it in quotes after the “Inlet\ Amb\ Temp=” part of the insert.