carbolymer / mtr-monitor

Simple MTR runner with grafana and influxdb on board
65 stars 16 forks source link

Save_Data.py Modification #11

Open Endwin-Redwood opened 1 year ago

Endwin-Redwood commented 1 year ago

I set mine up without any docker dependencies.

In my use case: Python 3.9.2 MTR 0.94 InfluxDB 1.8.10 Grafana v10.1.1

Had to modify save_data.py line 45-48 thus:

    if hub['count'] < 10:
        hop = "0" + str(hub['count']) + "-" + hub['host']
    else:
        hop = str(hub['count']) + "-" + hub['host']

Python3 was unable to do a string conversion from int with string concatenation. Explicitly changed int to str.

Hope this helps someone out!