I am trying to do the following:
influx -database 'polls' -execute 'insert nodeMemory,NodeID=1,server=server01 values="$nodemem1"']
I get the following errors:
ERR: {"error":"unable to parse 'nodeMemory,NodeID=1,server=server01 values=`$nodemem1`': invalid boolean"}
How do I enter a variable as a value?
I expected it to enter the variable
You have the query wrapped in single quotes
'
instead of double quotes. Try double-quoting, and escape the inner double quotes:Depending on what influxdb expects, you might even be able to do away with the inner double quotes altogether: