Community discussions

MUM Europe 2020
 
jeremyh
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Tue Jul 10, 2012 1:21 pm

Help with sending data to InfluxDB using fetch tool

Sat Aug 18, 2018 2:02 pm

Hi,

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:
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:

/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!

Who is online

Users browsing this forum: MSN [Bot] and 33 guests