I have been trying to get RouterOS to send data into influxDB but haven't had much luck. I am hoping that someone either has already figured this out, or maybe can spot my error.
The following cURL command works to write a value to InfluxDB:
Code: Select all
curl -i -XPOST http://192.168.12.34:8086/write?db=mikrotik --data-binary "measurementname,host=routername value=1"
However, when I try to refactor it as a fetch command, this does not work:
Code: Select all
/tool fetch mode=http url="http://192.168.12.34/write\?db=mikrotik" port=8086 http-method=post http-data="payload={\"measurementname,host=routername\": \"value=1"}"
I have experimented with escaping the characters inside the payload but cannot seem to crack it.
Anyone have any ideas? Thankyou!