I slightly adjusted the mtr-monitor.sh to not create Docker containers because I have an existing InfluxDB in my environment. But the python script returns the following error:
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
Traceback (most recent call last):
File "./save_data.py", line 65, in <module>
main()
File "./save_data.py", line 61, in main
HubEntry.commit()
File "/usr/lib/python2.7/dist-packages/influxdb/helper.py", line 127, in commit
rtn = client.write_points(cls._json_body_())
File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 391, in write_points
tags=tags)
File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 436, in _write_points
expected_response_code=204
File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 278, in write
headers=headers
File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 248, in request
raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"unable to parse '8.8.8.8,destination=8.8.8.8,hop=01-10.166.102.3 avg=3.56,best=0.38,last=6.53,loss=0.0,snt=30i,stdev=8.67,time=2018-12-12 11:16:06.119893,wrst=47.22': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=02-10.255.254.97 avg=0.79,best=0.45,last=0.86,loss=0.0,snt=30i,stdev=0.12,time=2018-12-12 11:16:06.119893,wrst=1.04': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=03-172.30.8.11 avg=0.59,best=0.39,last=0.67,loss=0.0,snt=30i,stdev=0.17,time=2018-12-12 11:16:06.119893,wrst=1.02': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=04-172.30.5.11 avg=0.79,best=0.54,last=0.77,loss=0.0,snt=30i,stdev=0.23,time=2018-12-12 11:16:06.119893,wrst=1.57': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=05-194.40.224.196 avg=1.53,best=1.29,last=1.65,loss=0.0,snt=30i,stdev=0.15,time=2018-12-12 11:16:06.119893,wrst=1.91': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=06-i79zhh-001-ten0-3-0-11.bb.ip-plus.net avg=2.12,best=1.8,last=2.12,loss=0.0,snt=30i,stdev=0.2,time=2018-12-12 11:16:06.119893,wrst=2.62': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=07-i79zhh-015-ae5.bb.ip-plus.net avg=4.62,best=1.7,last=1.92,loss=0.0,snt=30i,stdev=6.69,time=2018-12-12 11:16:06.119893,wrst=30.79': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=08-72.14.223.0 avg=3.03,best=2.69,last=3.03,loss=0.0,snt=30i,stdev=0.24,time=2018-12-12 11:16:06.119893,wrst=3.95': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=09-??? avg=0.0,best=0.0,last=0.0,loss=100.0,snt=30i,stdev=0.0,time=2018-12-12 11:16:06.119893,wrst=0.0': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=10-172.253.50.22 avg=3.99,best=3.7,last=4.5,loss=0.0,snt=30i,stdev=0.2,time=2018-12-12 11:16:06.119893,wrst=4.5': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=11-172.253.50.173 avg=4.34,best=3.43,last=3.7,loss=0.0,snt=30i,stdev=2.63,time=2018-12-12 11:16:06.119893,wrst=18.13': invalid number\nunable to parse '8.8.8.8,destination=8.8.8.8,hop=12-google-public-dns-a.google.com avg=2.12,best=1.95,last=1.95,loss=0.0,snt=30i,stdev=0.17,time=2018-12-12 11:16:06.119893,wrst=2.62': invalid number"}
I'm aware that I'm not using your script the way you wrote it, but maybe you have an idea if the problem is related to my InfluxDB (1.6.4) or to a different output of mtr (0.92)?