├── GetIPinfo.py ├── README.md ├── TG.py ├── TGSetup.sh ├── TransmissionGraf.json ├── config.py └── note.txt /GetIPinfo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | #https://github.com/maxmind/GeoIP2-python 4 | 5 | import datetime 6 | import psutil 7 | from influxdb import InfluxDBClient 8 | import geoip2.database 9 | import socket 10 | import sys 11 | 12 | 13 | 14 | print str(sys.argv[1]) 15 | 16 | print str(sys.argv[1]) 17 | 18 | 19 | print(socket.gethostname()) 20 | 21 | reader = geoip2.database.Reader('/home/titan/Scripts/Grafana/GeoLite2-City.mmdb') 22 | response = reader.city(str(sys.argv[1])) 23 | 24 | Lat = response.location.latitude 25 | ISO = response.country.iso_code 26 | Long = response.location.longitude 27 | State = response.subdivisions.most_specific.name 28 | City = response.city.name 29 | Country = response.country.name 30 | Zip = response.postal.code 31 | IP = str(sys.argv[1]) 32 | print (Country) 33 | print (State) 34 | print (City) 35 | print (Zip) 36 | print (Long) 37 | print (Lat) 38 | print (ISO) 39 | print (IP) 40 | reader.close() 41 | 42 | 43 | 44 | # influx configuration - edit these 45 | ifuser = "PASSWORD" 46 | ifpass = "PASSWORD" 47 | #ifdb = "DATABASE" 48 | ifdb = "Test" 49 | ifhost = "192.168.0.1" 50 | ifport = 8081 51 | hostname = socket.gethostname() 52 | measurement_name = (hostname + ":Locations") 53 | print (measurement_name) 54 | # take a timestamp for this measurement 55 | time = datetime.datetime.utcnow() 56 | 57 | # format the data as a single measurement for influx 58 | body = [ 59 | { 60 | "measurement": measurement_name, 61 | "time": time, 62 | "tags": { 63 | "key": ISO, 64 | "latitude": Lat, 65 | "longitude": Long, 66 | "name": Country 67 | }, 68 | "fields": { 69 | 70 | "latitude": Lat, 71 | "longitude": Long, 72 | "State": State, 73 | "City": City, 74 | "key": ISO, 75 | "IPAdress": IP, 76 | "name": Country, 77 | "metric": 1 78 | 79 | 80 | 81 | } 82 | } 83 | ] 84 | 85 | # connect to influx 86 | ifclient = InfluxDBClient(ifhost,ifport,ifuser,ifpass,ifdb) 87 | 88 | # write the measurement 89 | ifclient.write_points(body) 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TransmissionGraf is a script which provides transmission-daemon info to InfluxDB 2 | 3 | you will need to obtain your own 'GeoLite2-City.mmdb' and place it in TranmsissionGraf Folder. 4 | https://dev.maxmind.com/geoip/geoip2/geolite2/ 5 | 6 | Currently set to run from home dir but can be configured differently 7 | 8 | Requires remote command line connection to transmission-deamon (with username/password) and influxdb 9 | Run TransmissionGraf/TGsetup.sh to install requirements 10 | Update TranmissionGraf/config.py with your personalized settings for influx and transmission-daemon 11 | Run TG.py using python3 12 | ![image](https://user-images.githubusercontent.com/65983438/82976070-c4e44000-9fa3-11ea-862a-5003606e5fc5.png) 13 | ![TransGraf](https://user-images.githubusercontent.com/65983438/83154918-4c29d480-a0c6-11ea-9278-03c4e04c6c86.png) 14 | 15 | 16 | Released May 29th 2020! 17 | -------------------------------------------------------------------------------- /TG.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | #/usr/bin/python3 /home/titan/Scripts/TransmissionGraf/TG.py 4 | #https://github.com/Festeazy/TranmissionGraf 5 | #V0.01 - Baseline - provided basic info 6 | #V0.02 - Added Geo Mapping for peers 7 | #Current 8 | #V0.03 - Plans to add Leech/Peer Ratio 9 | #Dont really know what Im doing but here you go! 10 | 11 | 12 | import os 13 | import re 14 | import sys 15 | import time 16 | import sys 17 | import socket 18 | from influxdb import InfluxDBClient 19 | import geoip2.database 20 | import datetime 21 | import pygeohash as pgh 22 | import config 23 | import logging 24 | ##Above -- Imports 25 | 26 | logging.basicConfig(filename=str(config.TransmissionGrafFolder) + 'TG.log',level=logging.INFO) 27 | print ("Logging Activated") 28 | # logging.debug('This message should go to the log file') 29 | # logging.info('So should this') 30 | # logging.warning('And this, too') 31 | 32 | # logging.info(str(config.TransmissionPort)) 33 | # logging.info(str(config.TransmissionUsername)) 34 | # logging.info(str(config.TransmissionPassword)) 35 | # logging.info(str(config.InfluxDBUsername)) 36 | # logging.info(str(config.InfluxDBPassword)) 37 | # logging.info(str(config.InfluxDBDatabase)) 38 | # logging.info(str(config.InfluxDBHost)) 39 | # logging.info(str(config.InfluxDBPort)) 40 | # logging.info(str(config.TransmissionGrafFolder)) 41 | # logging.warning(str(config.TransmissionGrafFolder)) 42 | 43 | ##Below - Set variables for InfluxDBClient 44 | CurrentScript = sys.argv[0] 45 | hostname = socket.gethostname() 46 | measurement_name = (hostname + ":Transmissoin:Status:" + CurrentScript) #Specific measurement name for Hostname + Script Name 47 | measurement_time = datetime.datetime.utcnow() ##Time Variable to ensure all writes are synced to this Specific Script Execution 48 | print (measurement_name) 49 | ##Above - Set variables for InfluxDBClient 50 | logging.info(str(measurement_time)) 51 | 52 | def SendConfig(): #Create and Send InfluxDB body with file information 53 | body = [ 54 | { 55 | "measurement": measurement_name, 56 | "time": measurement_time, 57 | "tags": { 58 | "Name": Name, 59 | "Hash": Hash, 60 | "Status": Status 61 | }, 62 | "fields": { 63 | "DownSpeed": float(KBDownloadingSpeed), 64 | "UpSpeed": float(KBUploadingSpeed), 65 | "Total": float(KBTotalSize), 66 | "Downloaded": int(KBsDownloaded), 67 | "Uploaded": float(KBsUploaded), 68 | #"Ratio": float(Var.Ratio), 69 | "ETASeconds": int(ETASeconds), 70 | "Percent": float(IPercent), 71 | "Status": Status 72 | } 73 | } 74 | ] 75 | print ("Body has been built, Sending Config Message now") 76 | ifclient = InfluxDBClient(config.InfluxDBHost,config.InfluxDBPort,config.InfluxDBUsername,config.InfluxDBPassword,config.InfluxDBDatabase) 77 | print ("Connected to Influx") 78 | print ("Writing to Influx") 79 | ifclient.write_points(body) 80 | print ("Sent to Influx") 81 | 82 | 83 | def SendIPinfo():## function to create write info to InfluxDB per Peer connected 84 | print ("Gathering IP Info") 85 | PeerinfoCMD = "transmission-remote " + str(config.TransmissionHost) + ":" + str(config.TransmissionPort) + " -n " + str(config.TransmissionUsername) + ":" + str(config.TransmissionPassword) + " -t " + torrentnumber + ' -pi | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" > ' + str(config.TransmissionGrafPeerinfo) 86 | print (PeerinfoCMD) 87 | Peerinfo = os.popen(PeerinfoCMD) 88 | time.sleep(.2) 89 | PeerinfoFile = str(config.TransmissionGrafPeerinfo) 90 | peerinfo = open(PeerinfoFile, "r") 91 | peers = peerinfo.readlines() 92 | for peer in peers: 93 | IP = str(peer)[:-1] 94 | logging.info(IP) 95 | #GeoIP(IP) 96 | reader = geoip2.database.Reader(config.GeoIPDBfile) 97 | response = reader.city(str(IP)) 98 | Lat = response.location.latitude 99 | ISO = response.country.iso_code 100 | Long = response.location.longitude 101 | State = response.subdivisions.most_specific.name 102 | City = response.city.name 103 | Country = response.country.name 104 | Zip = response.postal.code 105 | IPAddress = IP 106 | Geohash1 = pgh.encode(Lat,Long) 107 | Geohash = ('"' + Geohash1 + '"') 108 | Geopoint = (Lat,Long) 109 | print (Country) 110 | print (State) 111 | print (City) 112 | print (Zip) 113 | print (Long) 114 | print (Lat) 115 | print (ISO) 116 | print (IPAddress) 117 | print (Geohash) 118 | print (Geopoint) 119 | time.sleep(.2) 120 | reader.close() 121 | 122 | IPBody = [ 123 | { 124 | "measurement": measurement_name, 125 | "time": measurement_time, 126 | "tags": { 127 | "Name": Name, 128 | "Status": Status, 129 | "CurrentScript": str(CurrentScript), 130 | "ISO": str(ISO), 131 | "Lat": float(Lat), 132 | "Long": float(Long), 133 | "Geopoint": str(Geopoint), 134 | "IP": str(IPAddress) 135 | }, 136 | "fields": { 137 | "ISO": str(ISO), 138 | "Lat": float(Lat), 139 | "Long": float(Long), 140 | "Geohash": str(Geohash1), 141 | "Geopoint": str(Geopoint), 142 | "State": str(State), 143 | "City": str(City), 144 | "IP": str(IP), 145 | "Country": str(Country), 146 | "Metric": "1", 147 | "Hash": str(Hash), 148 | "Name": str(Name) 149 | } 150 | } 151 | ] 152 | print ("Body has been built, Sending IP Info now") 153 | ifclient = InfluxDBClient(config.InfluxDBHost,config.InfluxDBPort,config.InfluxDBUsername,config.InfluxDBPassword,config.InfluxDBDatabase) 154 | print ("Connected to Influx") 155 | print ("Writing to Influx") 156 | # write the measurement 157 | ifclient.write_points(IPBody) 158 | print ("Wrote to Influx") 159 | peerinfo.close() 160 | 161 | print ("") 162 | ##Above -- Sending Config to Influxdb 163 | 164 | CmdSummary = "transmission-remote " + str(config.TransmissionHost) + ":" + str(config.TransmissionPort) + " -n " + str(config.TransmissionUsername) + ":" + str(config.TransmissionPassword) + " -l > " + str(config.TransmissionGrafSummary) 165 | stream = os.popen(CmdSummary) 166 | #stream = os.popen(Transmission) 167 | TransmissionSummarty = stream.read() 168 | #print (TransmissionSummarty) 169 | TransmissionSummary = str(config.TransmissionGrafSummary) 170 | ##number and letter string modifcations 171 | Numberonly = re.compile('[^0-9]') 172 | Letteronly = re.compile('[^A-Za-z]') 173 | count = len(open(TransmissionSummary).readlines()) 174 | torrentnumbers = count-2 175 | f = open(TransmissionSummary, "r") 176 | lines = f.readlines()[1:-1] 177 | ## Start Loop for number of lines in summary minus 2 178 | for line in lines: 179 | #print(line) 180 | number = str(re.split("\s+", line)[1:2]) 181 | torrentnumber = Numberonly.sub('', number) 182 | Command = "transmission-remote " + str(config.TransmissionHost) + ":" + str(config.TransmissionPort) + " -n " + str(config.TransmissionUsername) + ":" + str(config.TransmissionPassword) + " -t " + torrentnumber + " -i > " + str(config.TransmissionGrafFileinfo) 183 | stream = os.popen(Command) 184 | #print (stream) 185 | time.sleep(.2) 186 | f2 = open(str(config.TransmissionGrafFileinfo)) 187 | lines=f2.readlines() 188 | print (lines) 189 | ID = str(lines[1])[6:-1] 190 | 191 | Name = str(lines[2])[8:-1] 192 | Hash = str(lines[3])[9:-1] 193 | Magnet = str(lines[4])[10:-1] 194 | Status = str(lines[7])[9:-1] 195 | Location = str(lines[8])[12:-1] 196 | Percent = str(lines[9])[16:-2] 197 | ETA = str(lines[10])[7:-1] 198 | DownloadSpeed = str(lines[11])[18:-1] 199 | UploadSpeed = str(lines[12])[16:-1] 200 | Availability = str(lines[14])[16:-2] 201 | TotalSize = str(lines[15])[15:-1] 202 | Downloaded = str(lines[16])[14:-1] 203 | Uploaded = str(lines[17])[12:-1] 204 | Ratio = str(lines[18])[8:-1] 205 | DownloadTime = str(lines[26])[1:-1] 206 | #days,hrs,se 207 | ##Printing Results 208 | f2.close() 209 | print ("------------------------------------------- BEGINING -------------------------") 210 | print ("ID :" + str(ID)) 211 | print ("Name :" + str(Name)) 212 | print ("Hash :" + str(Hash)) 213 | #print ("Magnet :" + str(Magnet)) 214 | print ("Status :" + str(Status)) 215 | print ("Location :" + str(Location)) 216 | print ("Percent :" + str(Percent)) 217 | if Percent == ("nan"): 218 | Percent = str("0.00") 219 | print ("ETA :" + str(ETA)) 220 | mymatch = re.search(r'\((.+)\)', str(lines[10])[7:-1]) ## Getting the seconds for ETA for Influx 221 | ETASeconds1 = mymatch.group(0) 222 | print ("ETA Seconds :" + str(ETASeconds1)) 223 | ETASeconds = Numberonly.sub('', ETASeconds1) 224 | print ("Download Speed :" + str(DownloadSpeed)) 225 | print ("Upload Speed :" + str(UploadSpeed)) 226 | print ("Availability :" + str(Availability)) 227 | print ("Total Size :" + str(TotalSize)) 228 | if str(TotalSize)[1:3] == "na": 229 | TotalSize = str("0.00 MB") 230 | else: 231 | mymatch1 = re.search(r'\((.+)\)',TotalSize) 232 | WantedSize = str(mymatch1.group(0))[1:-11] 233 | 234 | print ("Wanted Size :" + str(WantedSize)) 235 | print ("Downloaded :" + str(Downloaded)) 236 | print ("Uploaded :" + str(Uploaded)) 237 | if Uploaded[:4] == ("None"): 238 | Uploaded = str("0.00 MB") 239 | else: 240 | print ("Uploaded dont match") 241 | print ("Ratio :" + str(Ratio)) 242 | 243 | time.sleep(.2) 244 | 245 | 246 | 247 | 248 | #print ("Downloaded for :" + str(DownloadTime)) 249 | DownloadTime1 = re.search(r'\((.+)\)', str(lines[26])[1:-1]) 250 | DownloadTimeSeconds1 = mymatch.group(0) 251 | DownloadTimeSeconds = Numberonly.sub('', DownloadTimeSeconds1) 252 | print ("Downloaded for Seconds :" + DownloadTimeSeconds) 253 | 254 | ## Convert to Influx Data 255 | 256 | ##Speed Conversions 257 | DownloadSpeedUnit = Letteronly.sub('', DownloadSpeed) #Download Speed Conversions 258 | KBDownloadingSpeed = Numberonly.sub('', DownloadSpeed) 259 | 260 | if DownloadSpeedUnit == "MB": 261 | KBDownloadingSpeed = float(KBDownloadingSpeed)*1000 262 | print ("Downloading Speed :" + KBDownloadingSpeed + DownloadSpeedUnit) 263 | ###uploading below 264 | UploadSpeedUnit = Letteronly.sub('', UploadSpeed) #Upload Speed Conversions 265 | KBUploadingSpeed = Numberonly.sub('', UploadSpeed) 266 | if UploadSpeedUnit == "MB": 267 | KBUploadingSpeed = float(KBUploadingSpeed)*1000 268 | print ("Uploading Speed kB:" + KBUploadingSpeed + UploadSpeedUnit) 269 | ## Speed Conversions 270 | 271 | #Total Conversions 272 | 273 | 274 | TotalSizeUnit1 = Letteronly.sub('', TotalSize) 275 | TotalSizeUnit = TotalSizeUnit1[:2] 276 | 277 | 278 | 279 | TotalSize = Numberonly.sub('', WantedSize) 280 | if TotalSizeUnit == "MB": 281 | KBTotalSize = float(TotalSize)*100 282 | elif TotalSizeUnit == "GB": 283 | KBTotalSize = float(TotalSize)*100000 284 | print ("Total Size KB:" + str(KBTotalSize) + TotalSizeUnit) 285 | 286 | 287 | #unit Conversions for Downloaded/Uploaded 288 | #GB,MB to kb 289 | DownloadUnit = Letteronly.sub('', Downloaded) 290 | print ("Downloaded unit :" + DownloadUnit) #Getting unit for downloaded amount 291 | 292 | DownloadedNumber = Numberonly.sub('', Downloaded) #Getting Number for Downloaded Amount 293 | print ("Downloaded Number :" + DownloadedNumber) 294 | 295 | if DownloadUnit == "MB": # if only MB's downloaded 296 | KBsDownloaded = float(DownloadedNumber)*100 297 | print ("KB Downloaded :" + str(KBsDownloaded) + str(DownloadUnit)) 298 | elif DownloadUnit == "GB": # if only gb's downloaded 299 | KBsDownloaded = int(DownloadedNumber)*10000 300 | print ("KB Downloaded :" + str(KBsDownloaded) + str(DownloadUnit)) 301 | elif DownloadUnit == "kB": # if only gb's downloaded 302 | KBsDownloaded = int(DownloadedNumber)*1 303 | print ("KB Downloaded :" + str(KBsDownloaded) + str(DownloadUnit)) 304 | else: 305 | KBsDownloaded = int(0) 306 | print ("KB Downloaded :" + str(KBsDownloaded) + str(DownloadUnit)) 307 | 308 | UploadUnit = Letteronly.sub('', Uploaded) 309 | print ("Uploaded unit :" + UploadUnit) 310 | 311 | UploadedNumber = Numberonly.sub('', Uploaded) ##str(lines[17])[12:-4] 312 | print ("UploadedNumber :" + UploadedNumber) 313 | if UploadUnit == "MB": 314 | KBsUploaded = float(UploadedNumber)*100 315 | elif UploadUnit == "GB": 316 | KBsUploaded = float(UploadedNumber)*10000 317 | elif UploadUnit == "kB": 318 | KBsUploaded = float(UploadedNumber)*1 319 | print ("KB Uploaded :" + str(KBsUploaded)) 320 | IPercent = float(Percent) 321 | print ("Influx Percent" + str(IPercent)) 322 | ##End of Loop 323 | time.sleep(.2) 324 | SendConfig() 325 | print ("Sending Config") 326 | time.sleep(.2) 327 | f.readlines() 328 | SendIPinfo() #For the torrent ID we are on, we will loop through all peers 329 | print ("----------------------------- End of Info --------------------------------") 330 | f.close() 331 | ##End of File 332 | -------------------------------------------------------------------------------- /TGSetup.sh: -------------------------------------------------------------------------------- 1 | apt install update -y 2 | apt install python3 transmission-daemon -y 3 | pip3 install influxdb 4 | pip3 install pygeohash 5 | pip3 install geoip2 6 | pip3 install Geohash -------------------------------------------------------------------------------- /TransmissionGraf.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_TEST", 5 | "label": "TEST", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "influxdb", 9 | "pluginName": "InfluxDB" 10 | } 11 | ], 12 | "__requires": [ 13 | { 14 | "type": "grafana", 15 | "id": "grafana", 16 | "name": "Grafana", 17 | "version": "7.0.0" 18 | }, 19 | { 20 | "type": "panel", 21 | "id": "grafana-piechart-panel", 22 | "name": "Pie Chart", 23 | "version": "1.5.0" 24 | }, 25 | { 26 | "type": "panel", 27 | "id": "grafana-worldmap-panel", 28 | "name": "Worldmap Panel", 29 | "version": "0.3.2" 30 | }, 31 | { 32 | "type": "panel", 33 | "id": "graph", 34 | "name": "Graph", 35 | "version": "" 36 | }, 37 | { 38 | "type": "datasource", 39 | "id": "influxdb", 40 | "name": "InfluxDB", 41 | "version": "1.0.0" 42 | }, 43 | { 44 | "type": "panel", 45 | "id": "table", 46 | "name": "Table", 47 | "version": "" 48 | } 49 | ], 50 | "annotations": { 51 | "list": [ 52 | { 53 | "builtIn": 1, 54 | "datasource": "-- Grafana --", 55 | "enable": true, 56 | "hide": true, 57 | "iconColor": "rgba(0, 211, 255, 1)", 58 | "name": "Annotations & Alerts", 59 | "type": "dashboard" 60 | } 61 | ] 62 | }, 63 | "editable": true, 64 | "gnetId": null, 65 | "graphTooltip": 0, 66 | "id": null, 67 | "links": [], 68 | "panels": [ 69 | { 70 | "aliasColors": {}, 71 | "bars": true, 72 | "dashLength": 10, 73 | "dashes": false, 74 | "datasource": "${DS_TEST}", 75 | "fieldConfig": { 76 | "defaults": { 77 | "custom": {} 78 | }, 79 | "overrides": [] 80 | }, 81 | "fill": 1, 82 | "fillGradient": 0, 83 | "gridPos": { 84 | "h": 7, 85 | "w": 8, 86 | "x": 0, 87 | "y": 0 88 | }, 89 | "hiddenSeries": false, 90 | "id": 31, 91 | "legend": { 92 | "avg": false, 93 | "current": false, 94 | "hideEmpty": true, 95 | "hideZero": true, 96 | "max": false, 97 | "min": false, 98 | "show": false, 99 | "total": false, 100 | "values": false 101 | }, 102 | "lines": true, 103 | "linewidth": 1, 104 | "nullPointMode": "null", 105 | "options": { 106 | "dataLinks": [] 107 | }, 108 | "percentage": false, 109 | "pointradius": 2, 110 | "points": false, 111 | "renderer": "flot", 112 | "seriesOverrides": [], 113 | "spaceLength": 10, 114 | "stack": true, 115 | "steppedLine": false, 116 | "targets": [ 117 | { 118 | "alias": "$tag_Name", 119 | "groupBy": [ 120 | { 121 | "params": [ 122 | "$__interval" 123 | ], 124 | "type": "time" 125 | }, 126 | { 127 | "params": [ 128 | "Name" 129 | ], 130 | "type": "tag" 131 | }, 132 | { 133 | "params": [ 134 | "null" 135 | ], 136 | "type": "fill" 137 | } 138 | ], 139 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 140 | "orderByTime": "ASC", 141 | "policy": "default", 142 | "refId": "A", 143 | "resultFormat": "time_series", 144 | "select": [ 145 | [ 146 | { 147 | "params": [ 148 | "DownSpeed" 149 | ], 150 | "type": "field" 151 | }, 152 | { 153 | "params": [], 154 | "type": "mean" 155 | }, 156 | { 157 | "params": [ 158 | "5" 159 | ], 160 | "type": "moving_average" 161 | } 162 | ] 163 | ], 164 | "tags": [] 165 | } 166 | ], 167 | "thresholds": [], 168 | "timeFrom": null, 169 | "timeRegions": [], 170 | "timeShift": null, 171 | "title": "Download Speed", 172 | "tooltip": { 173 | "shared": true, 174 | "sort": 0, 175 | "value_type": "individual" 176 | }, 177 | "transparent": true, 178 | "type": "graph", 179 | "xaxis": { 180 | "buckets": null, 181 | "mode": "time", 182 | "name": null, 183 | "show": true, 184 | "values": [] 185 | }, 186 | "yaxes": [ 187 | { 188 | "$$hashKey": "object:2503", 189 | "format": "KBs", 190 | "label": null, 191 | "logBase": 1, 192 | "max": null, 193 | "min": "0", 194 | "show": true 195 | }, 196 | { 197 | "$$hashKey": "object:2504", 198 | "format": "short", 199 | "label": null, 200 | "logBase": 1, 201 | "max": null, 202 | "min": null, 203 | "show": true 204 | } 205 | ], 206 | "yaxis": { 207 | "align": false, 208 | "alignLevel": null 209 | } 210 | }, 211 | { 212 | "datasource": "${DS_TEST}", 213 | "fieldConfig": { 214 | "defaults": { 215 | "custom": { 216 | "align": "center", 217 | "displayMode": "color-text" 218 | }, 219 | "decimals": 1, 220 | "mappings": [ 221 | { 222 | "from": "", 223 | "id": 0, 224 | "operator": "", 225 | "text": "Complete", 226 | "to": "", 227 | "type": 1, 228 | "value": "100" 229 | } 230 | ], 231 | "noValue": "null", 232 | "thresholds": { 233 | "mode": "absolute", 234 | "steps": [ 235 | { 236 | "color": "red", 237 | "value": null 238 | }, 239 | { 240 | "color": "orange", 241 | "value": 30 242 | }, 243 | { 244 | "color": "yellow", 245 | "value": 60 246 | }, 247 | { 248 | "color": "green", 249 | "value": 95 250 | } 251 | ] 252 | } 253 | }, 254 | "overrides": [ 255 | { 256 | "matcher": { 257 | "id": "byName", 258 | "options": "Time" 259 | }, 260 | "properties": [ 261 | { 262 | "id": "custom.width", 263 | "value": 163 264 | } 265 | ] 266 | }, 267 | { 268 | "matcher": { 269 | "id": "byName", 270 | "options": "Percent" 271 | }, 272 | "properties": [ 273 | { 274 | "id": "custom.width", 275 | "value": 181 276 | }, 277 | { 278 | "id": "unit", 279 | "value": "percent" 280 | } 281 | ] 282 | }, 283 | { 284 | "matcher": { 285 | "id": "byName", 286 | "options": "Name" 287 | }, 288 | "properties": [ 289 | { 290 | "id": "custom.width", 291 | "value": 323 292 | } 293 | ] 294 | }, 295 | { 296 | "matcher": { 297 | "id": "byName", 298 | "options": "DownSpeed" 299 | }, 300 | "properties": [ 301 | { 302 | "id": "custom.width", 303 | "value": 283 304 | }, 305 | { 306 | "id": "unit", 307 | "value": "KBs" 308 | } 309 | ] 310 | } 311 | ] 312 | }, 313 | "gridPos": { 314 | "h": 8, 315 | "w": 16, 316 | "x": 8, 317 | "y": 0 318 | }, 319 | "id": 14, 320 | "options": { 321 | "showHeader": true 322 | }, 323 | "pluginVersion": "7.0.0", 324 | "targets": [ 325 | { 326 | "groupBy": [ 327 | { 328 | "params": [ 329 | "Name" 330 | ], 331 | "type": "tag" 332 | } 333 | ], 334 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 335 | "orderByTime": "ASC", 336 | "policy": "default", 337 | "refId": "A", 338 | "resultFormat": "table", 339 | "select": [ 340 | [ 341 | { 342 | "params": [ 343 | "Percent" 344 | ], 345 | "type": "field" 346 | }, 347 | { 348 | "params": [], 349 | "type": "last" 350 | }, 351 | { 352 | "params": [ 353 | "Percent" 354 | ], 355 | "type": "alias" 356 | } 357 | ], 358 | [ 359 | { 360 | "params": [ 361 | "Status" 362 | ], 363 | "type": "field" 364 | }, 365 | { 366 | "params": [], 367 | "type": "last" 368 | }, 369 | { 370 | "params": [ 371 | "Status" 372 | ], 373 | "type": "alias" 374 | } 375 | ], 376 | [ 377 | { 378 | "params": [ 379 | "DownSpeed" 380 | ], 381 | "type": "field" 382 | }, 383 | { 384 | "params": [], 385 | "type": "last" 386 | }, 387 | { 388 | "params": [ 389 | "DownSpeed" 390 | ], 391 | "type": "alias" 392 | } 393 | ] 394 | ], 395 | "tags": [] 396 | } 397 | ], 398 | "timeFrom": null, 399 | "timeShift": null, 400 | "title": "Summary", 401 | "transparent": true, 402 | "type": "table" 403 | }, 404 | { 405 | "aliasColors": {}, 406 | "bars": false, 407 | "dashLength": 10, 408 | "dashes": false, 409 | "datasource": "${DS_TEST}", 410 | "fieldConfig": { 411 | "defaults": { 412 | "custom": {} 413 | }, 414 | "overrides": [] 415 | }, 416 | "fill": 1, 417 | "fillGradient": 0, 418 | "gridPos": { 419 | "h": 7, 420 | "w": 8, 421 | "x": 0, 422 | "y": 7 423 | }, 424 | "hiddenSeries": false, 425 | "id": 30, 426 | "legend": { 427 | "avg": false, 428 | "current": false, 429 | "max": false, 430 | "min": false, 431 | "show": false, 432 | "total": false, 433 | "values": false 434 | }, 435 | "lines": true, 436 | "linewidth": 1, 437 | "nullPointMode": "null", 438 | "options": { 439 | "dataLinks": [] 440 | }, 441 | "percentage": false, 442 | "pointradius": 2, 443 | "points": false, 444 | "renderer": "flot", 445 | "seriesOverrides": [], 446 | "spaceLength": 10, 447 | "stack": false, 448 | "steppedLine": false, 449 | "targets": [ 450 | { 451 | "alias": "$tag_Name", 452 | "groupBy": [ 453 | { 454 | "params": [ 455 | "$__interval" 456 | ], 457 | "type": "time" 458 | }, 459 | { 460 | "params": [ 461 | "Name" 462 | ], 463 | "type": "tag" 464 | }, 465 | { 466 | "params": [ 467 | "linear" 468 | ], 469 | "type": "fill" 470 | } 471 | ], 472 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 473 | "orderByTime": "ASC", 474 | "policy": "default", 475 | "refId": "A", 476 | "resultFormat": "time_series", 477 | "select": [ 478 | [ 479 | { 480 | "params": [ 481 | "UpSpeed" 482 | ], 483 | "type": "field" 484 | }, 485 | { 486 | "params": [], 487 | "type": "mean" 488 | } 489 | ] 490 | ], 491 | "tags": [] 492 | } 493 | ], 494 | "thresholds": [], 495 | "timeFrom": null, 496 | "timeRegions": [], 497 | "timeShift": null, 498 | "title": "Upload Speed", 499 | "tooltip": { 500 | "shared": true, 501 | "sort": 0, 502 | "value_type": "individual" 503 | }, 504 | "transparent": true, 505 | "type": "graph", 506 | "xaxis": { 507 | "buckets": null, 508 | "mode": "time", 509 | "name": null, 510 | "show": true, 511 | "values": [] 512 | }, 513 | "yaxes": [ 514 | { 515 | "$$hashKey": "object:2503", 516 | "format": "KBs", 517 | "label": null, 518 | "logBase": 1, 519 | "max": null, 520 | "min": null, 521 | "show": true 522 | }, 523 | { 524 | "$$hashKey": "object:2504", 525 | "format": "short", 526 | "label": null, 527 | "logBase": 1, 528 | "max": null, 529 | "min": null, 530 | "show": true 531 | } 532 | ], 533 | "yaxis": { 534 | "align": false, 535 | "alignLevel": null 536 | } 537 | }, 538 | { 539 | "circleMaxSize": "10", 540 | "circleMinSize": "0", 541 | "colors": [ 542 | "#F2CC0C", 543 | "#FF780A", 544 | "#56A64B", 545 | "#3274D9", 546 | "#A352CC" 547 | ], 548 | "datasource": "${DS_TEST}", 549 | "decimals": 0, 550 | "esMetric": "Count", 551 | "fieldConfig": { 552 | "defaults": { 553 | "custom": {} 554 | }, 555 | "overrides": [] 556 | }, 557 | "gridPos": { 558 | "h": 15, 559 | "w": 16, 560 | "x": 8, 561 | "y": 8 562 | }, 563 | "hideEmpty": true, 564 | "hideZero": true, 565 | "id": 35, 566 | "initialZoom": "2", 567 | "locationData": "table", 568 | "mapCenter": "custom", 569 | "mapCenterLatitude": "35", 570 | "mapCenterLongitude": "0", 571 | "maxDataPoints": 1, 572 | "mouseWheelZoom": false, 573 | "showLegend": true, 574 | "stickyLabels": false, 575 | "tableQueryOptions": { 576 | "geohashField": "geohash", 577 | "labelField": "name", 578 | "latitudeField": "latitude", 579 | "longitudeField": "longitude", 580 | "metricField": "metric", 581 | "queryType": "coordinates" 582 | }, 583 | "targets": [ 584 | { 585 | "groupBy": [ 586 | { 587 | "params": [ 588 | "15m" 589 | ], 590 | "type": "time" 591 | }, 592 | { 593 | "params": [ 594 | "IP" 595 | ], 596 | "type": "tag" 597 | }, 598 | { 599 | "params": [ 600 | "none" 601 | ], 602 | "type": "fill" 603 | } 604 | ], 605 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 606 | "orderByTime": "ASC", 607 | "policy": "default", 608 | "refId": "A", 609 | "resultFormat": "table", 610 | "select": [ 611 | [ 612 | { 613 | "params": [ 614 | "Lat" 615 | ], 616 | "type": "field" 617 | }, 618 | { 619 | "params": [], 620 | "type": "last" 621 | }, 622 | { 623 | "params": [ 624 | "latitude" 625 | ], 626 | "type": "alias" 627 | } 628 | ], 629 | [ 630 | { 631 | "params": [ 632 | "Long" 633 | ], 634 | "type": "field" 635 | }, 636 | { 637 | "params": [], 638 | "type": "last" 639 | }, 640 | { 641 | "params": [ 642 | "longitude" 643 | ], 644 | "type": "alias" 645 | } 646 | ], 647 | [ 648 | { 649 | "params": [ 650 | "IP" 651 | ], 652 | "type": "field" 653 | }, 654 | { 655 | "params": [], 656 | "type": "last" 657 | }, 658 | { 659 | "params": [ 660 | "name" 661 | ], 662 | "type": "alias" 663 | } 664 | ], 665 | [ 666 | { 667 | "params": [ 668 | "Hash" 669 | ], 670 | "type": "field" 671 | }, 672 | { 673 | "params": [], 674 | "type": "distinct" 675 | }, 676 | { 677 | "params": [], 678 | "type": "count" 679 | }, 680 | { 681 | "params": [ 682 | "metric" 683 | ], 684 | "type": "alias" 685 | } 686 | ] 687 | ], 688 | "tags": [] 689 | } 690 | ], 691 | "thresholds": "3,6,9,12", 692 | "timeFrom": null, 693 | "timeShift": null, 694 | "title": "Transmission Peers", 695 | "transparent": true, 696 | "type": "grafana-worldmap-panel", 697 | "unitPlural": "", 698 | "unitSingle": "", 699 | "valueName": "total" 700 | }, 701 | { 702 | "aliasColors": {}, 703 | "breakPoint": "25%", 704 | "cacheTimeout": null, 705 | "combine": { 706 | "label": "Others", 707 | "threshold": 0 708 | }, 709 | "datasource": "${DS_TEST}", 710 | "fieldConfig": { 711 | "defaults": { 712 | "custom": {} 713 | }, 714 | "overrides": [] 715 | }, 716 | "fontSize": "80%", 717 | "format": "deckbytes", 718 | "gridPos": { 719 | "h": 8, 720 | "w": 8, 721 | "x": 0, 722 | "y": 14 723 | }, 724 | "id": 28, 725 | "interval": null, 726 | "legend": { 727 | "percentage": true, 728 | "percentageDecimals": null, 729 | "show": false, 730 | "values": true 731 | }, 732 | "legendType": "Under graph", 733 | "links": [], 734 | "maxDataPoints": 1, 735 | "nullPointMode": "connected", 736 | "pieType": "donut", 737 | "strokeWidth": 1, 738 | "targets": [ 739 | { 740 | "alias": "$tag_Name", 741 | "groupBy": [ 742 | { 743 | "params": [ 744 | "$__interval" 745 | ], 746 | "type": "time" 747 | }, 748 | { 749 | "params": [ 750 | "Name" 751 | ], 752 | "type": "tag" 753 | }, 754 | { 755 | "params": [ 756 | "linear" 757 | ], 758 | "type": "fill" 759 | } 760 | ], 761 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 762 | "orderByTime": "ASC", 763 | "policy": "default", 764 | "refId": "A", 765 | "resultFormat": "time_series", 766 | "select": [ 767 | [ 768 | { 769 | "params": [ 770 | "Downloaded" 771 | ], 772 | "type": "field" 773 | }, 774 | { 775 | "params": [], 776 | "type": "mean" 777 | } 778 | ] 779 | ], 780 | "tags": [] 781 | } 782 | ], 783 | "timeFrom": null, 784 | "timeShift": null, 785 | "title": "Total Downloaded", 786 | "transparent": true, 787 | "type": "grafana-piechart-panel", 788 | "valueName": "current" 789 | }, 790 | { 791 | "aliasColors": {}, 792 | "bars": false, 793 | "dashLength": 10, 794 | "dashes": false, 795 | "datasource": "${DS_TEST}", 796 | "fieldConfig": { 797 | "defaults": { 798 | "custom": {} 799 | }, 800 | "overrides": [] 801 | }, 802 | "fill": 1, 803 | "fillGradient": 0, 804 | "gridPos": { 805 | "h": 8, 806 | "w": 8, 807 | "x": 0, 808 | "y": 22 809 | }, 810 | "hiddenSeries": false, 811 | "id": 27, 812 | "legend": { 813 | "avg": false, 814 | "current": false, 815 | "max": false, 816 | "min": false, 817 | "show": true, 818 | "total": false, 819 | "values": false 820 | }, 821 | "lines": true, 822 | "linewidth": 1, 823 | "nullPointMode": "null", 824 | "options": { 825 | "dataLinks": [] 826 | }, 827 | "percentage": false, 828 | "pointradius": 2, 829 | "points": false, 830 | "renderer": "flot", 831 | "seriesOverrides": [], 832 | "spaceLength": 10, 833 | "stack": false, 834 | "steppedLine": false, 835 | "targets": [ 836 | { 837 | "alias": "$tag_Name", 838 | "groupBy": [ 839 | { 840 | "params": [ 841 | "$__interval" 842 | ], 843 | "type": "time" 844 | }, 845 | { 846 | "params": [ 847 | "Name" 848 | ], 849 | "type": "tag" 850 | }, 851 | { 852 | "params": [ 853 | "linear" 854 | ], 855 | "type": "fill" 856 | } 857 | ], 858 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 859 | "orderByTime": "ASC", 860 | "policy": "default", 861 | "refId": "A", 862 | "resultFormat": "time_series", 863 | "select": [ 864 | [ 865 | { 866 | "params": [ 867 | "Percent" 868 | ], 869 | "type": "field" 870 | }, 871 | { 872 | "params": [], 873 | "type": "mean" 874 | } 875 | ] 876 | ], 877 | "tags": [] 878 | } 879 | ], 880 | "thresholds": [], 881 | "timeFrom": null, 882 | "timeRegions": [], 883 | "timeShift": null, 884 | "title": "Percentage", 885 | "tooltip": { 886 | "shared": true, 887 | "sort": 0, 888 | "value_type": "individual" 889 | }, 890 | "transparent": true, 891 | "type": "graph", 892 | "xaxis": { 893 | "buckets": null, 894 | "mode": "time", 895 | "name": null, 896 | "show": true, 897 | "values": [] 898 | }, 899 | "yaxes": [ 900 | { 901 | "$$hashKey": "object:783", 902 | "format": "short", 903 | "label": null, 904 | "logBase": 1, 905 | "max": "100", 906 | "min": null, 907 | "show": true 908 | }, 909 | { 910 | "$$hashKey": "object:784", 911 | "format": "short", 912 | "label": null, 913 | "logBase": 1, 914 | "max": null, 915 | "min": null, 916 | "show": true 917 | } 918 | ], 919 | "yaxis": { 920 | "align": false, 921 | "alignLevel": null 922 | } 923 | }, 924 | { 925 | "aliasColors": {}, 926 | "bars": false, 927 | "dashLength": 10, 928 | "dashes": false, 929 | "datasource": "${DS_TEST}", 930 | "fieldConfig": { 931 | "defaults": { 932 | "custom": {} 933 | }, 934 | "overrides": [] 935 | }, 936 | "fill": 1, 937 | "fillGradient": 0, 938 | "gridPos": { 939 | "h": 8, 940 | "w": 8, 941 | "x": 8, 942 | "y": 23 943 | }, 944 | "hiddenSeries": false, 945 | "id": 36, 946 | "legend": { 947 | "avg": false, 948 | "current": false, 949 | "hideEmpty": true, 950 | "hideZero": true, 951 | "max": false, 952 | "min": false, 953 | "show": true, 954 | "total": false, 955 | "values": false 956 | }, 957 | "lines": true, 958 | "linewidth": 1, 959 | "nullPointMode": "null", 960 | "options": { 961 | "dataLinks": [] 962 | }, 963 | "percentage": false, 964 | "pointradius": 2, 965 | "points": false, 966 | "renderer": "flot", 967 | "seriesOverrides": [], 968 | "spaceLength": 10, 969 | "stack": false, 970 | "steppedLine": false, 971 | "targets": [ 972 | { 973 | "alias": "$tag_Name", 974 | "groupBy": [ 975 | { 976 | "params": [ 977 | "$__interval" 978 | ], 979 | "type": "time" 980 | }, 981 | { 982 | "params": [ 983 | "Name" 984 | ], 985 | "type": "tag" 986 | }, 987 | { 988 | "params": [ 989 | "linear" 990 | ], 991 | "type": "fill" 992 | } 993 | ], 994 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 995 | "orderByTime": "ASC", 996 | "policy": "default", 997 | "refId": "A", 998 | "resultFormat": "time_series", 999 | "select": [ 1000 | [ 1001 | { 1002 | "params": [ 1003 | "Uploaded" 1004 | ], 1005 | "type": "field" 1006 | }, 1007 | { 1008 | "params": [], 1009 | "type": "sum" 1010 | } 1011 | ] 1012 | ], 1013 | "tags": [] 1014 | } 1015 | ], 1016 | "thresholds": [], 1017 | "timeFrom": null, 1018 | "timeRegions": [], 1019 | "timeShift": null, 1020 | "title": "Total Uploaded - needs updating", 1021 | "tooltip": { 1022 | "shared": true, 1023 | "sort": 0, 1024 | "value_type": "individual" 1025 | }, 1026 | "transparent": true, 1027 | "type": "graph", 1028 | "xaxis": { 1029 | "buckets": null, 1030 | "mode": "time", 1031 | "name": null, 1032 | "show": true, 1033 | "values": [] 1034 | }, 1035 | "yaxes": [ 1036 | { 1037 | "$$hashKey": "object:3562", 1038 | "format": "deckbytes", 1039 | "label": null, 1040 | "logBase": 1, 1041 | "max": null, 1042 | "min": null, 1043 | "show": true 1044 | }, 1045 | { 1046 | "$$hashKey": "object:3563", 1047 | "format": "short", 1048 | "label": null, 1049 | "logBase": 1, 1050 | "max": null, 1051 | "min": null, 1052 | "show": true 1053 | } 1054 | ], 1055 | "yaxis": { 1056 | "align": false, 1057 | "alignLevel": null 1058 | } 1059 | }, 1060 | { 1061 | "aliasColors": {}, 1062 | "bars": false, 1063 | "dashLength": 10, 1064 | "dashes": false, 1065 | "datasource": "${DS_TEST}", 1066 | "fieldConfig": { 1067 | "defaults": { 1068 | "custom": {} 1069 | }, 1070 | "overrides": [] 1071 | }, 1072 | "fill": 1, 1073 | "fillGradient": 0, 1074 | "gridPos": { 1075 | "h": 8, 1076 | "w": 8, 1077 | "x": 16, 1078 | "y": 23 1079 | }, 1080 | "hiddenSeries": false, 1081 | "id": 19, 1082 | "legend": { 1083 | "avg": false, 1084 | "current": false, 1085 | "max": false, 1086 | "min": false, 1087 | "show": true, 1088 | "total": false, 1089 | "values": false 1090 | }, 1091 | "lines": true, 1092 | "linewidth": 1, 1093 | "nullPointMode": "null", 1094 | "options": { 1095 | "dataLinks": [] 1096 | }, 1097 | "percentage": false, 1098 | "pointradius": 2, 1099 | "points": false, 1100 | "renderer": "flot", 1101 | "seriesOverrides": [], 1102 | "spaceLength": 10, 1103 | "stack": false, 1104 | "steppedLine": false, 1105 | "targets": [ 1106 | { 1107 | "alias": "$tag_Name", 1108 | "groupBy": [ 1109 | { 1110 | "params": [ 1111 | "$__interval" 1112 | ], 1113 | "type": "time" 1114 | }, 1115 | { 1116 | "params": [ 1117 | "Name" 1118 | ], 1119 | "type": "tag" 1120 | }, 1121 | { 1122 | "params": [ 1123 | "linear" 1124 | ], 1125 | "type": "fill" 1126 | } 1127 | ], 1128 | "measurement": "Pi10:Transmissoin:Status:/home/titan/Scripts/TransmissionGraf/TG.py", 1129 | "orderByTime": "ASC", 1130 | "policy": "default", 1131 | "refId": "A", 1132 | "resultFormat": "time_series", 1133 | "select": [ 1134 | [ 1135 | { 1136 | "params": [ 1137 | "ETASeconds" 1138 | ], 1139 | "type": "field" 1140 | }, 1141 | { 1142 | "params": [], 1143 | "type": "last" 1144 | }, 1145 | { 1146 | "params": [ 1147 | "5" 1148 | ], 1149 | "type": "moving_average" 1150 | }, 1151 | { 1152 | "params": [ 1153 | "Seconds" 1154 | ], 1155 | "type": "alias" 1156 | } 1157 | ] 1158 | ], 1159 | "tags": [] 1160 | } 1161 | ], 1162 | "thresholds": [ 1163 | { 1164 | "$$hashKey": "object:1570", 1165 | "colorMode": "critical", 1166 | "fill": false, 1167 | "line": false, 1168 | "op": "gt", 1169 | "value": 47578, 1170 | "yaxis": "left" 1171 | } 1172 | ], 1173 | "timeFrom": null, 1174 | "timeRegions": [], 1175 | "timeShift": null, 1176 | "title": "ETA", 1177 | "tooltip": { 1178 | "shared": true, 1179 | "sort": 0, 1180 | "value_type": "individual" 1181 | }, 1182 | "transparent": true, 1183 | "type": "graph", 1184 | "xaxis": { 1185 | "buckets": null, 1186 | "mode": "time", 1187 | "name": null, 1188 | "show": true, 1189 | "values": [] 1190 | }, 1191 | "yaxes": [ 1192 | { 1193 | "$$hashKey": "object:3733", 1194 | "format": "s", 1195 | "label": null, 1196 | "logBase": 1, 1197 | "max": "1210000", 1198 | "min": null, 1199 | "show": true 1200 | }, 1201 | { 1202 | "$$hashKey": "object:3734", 1203 | "format": "short", 1204 | "label": null, 1205 | "logBase": 1, 1206 | "max": null, 1207 | "min": null, 1208 | "show": true 1209 | } 1210 | ], 1211 | "yaxis": { 1212 | "align": false, 1213 | "alignLevel": null 1214 | } 1215 | } 1216 | ], 1217 | "refresh": "1m", 1218 | "schemaVersion": 25, 1219 | "style": "dark", 1220 | "tags": [], 1221 | "templating": { 1222 | "list": [] 1223 | }, 1224 | "time": { 1225 | "from": "now-30m", 1226 | "to": "now-10s" 1227 | }, 1228 | "timepicker": { 1229 | "nowDelay": "10s", 1230 | "refresh_intervals": [ 1231 | "10s", 1232 | "30s", 1233 | "1m", 1234 | "5m", 1235 | "15m", 1236 | "30m", 1237 | "1h", 1238 | "2h", 1239 | "1d" 1240 | ] 1241 | }, 1242 | "timezone": "America/Chicago", 1243 | "title": "Transmission", 1244 | "uid": "T0VwwrRGk", 1245 | "version": 306 1246 | } -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | import os 3 | homedir = os.environ['HOME'] 4 | TransmissionGrafFolder=str(homedir + "/Scripts/TransmissionGraf/") 5 | GeoIPDBfile=str(TransmissionGrafFolder + "GeoLite2-City.mmdb") 6 | TransmissionGrafFileinfo=str(TransmissionGrafFolder + ".fileinfo") 7 | TransmissionGrafPeerinfo=str(TransmissionGrafFolder + ".peerinfo") 8 | TransmissionGrafSummary=str(TransmissionGrafFolder + ".transmissionsummary") 9 | 10 | TransmissionHost="192.168.0.1" 11 | TransmissionPort="9091" 12 | TransmissionUsername="USERNAME" 13 | TransmissionPassword="Password" 14 | 15 | InfluxDBUsername="USERNAME" 16 | InfluxDBPassword="Password" 17 | InfluxDBDatabase="Test" 18 | InfluxDBHost="192.168.0.1" 19 | InfluxDBPort="8081" -------------------------------------------------------------------------------- /note.txt: -------------------------------------------------------------------------------- 1 | Ethics: 2 | the day before i shared this script, i thought about what the script does and how it can be used, part of me doesnt agree with sharing this script/idea. 3 | even though the script is simple and anyone with scripting knowledge can craft, the idea has me confilicted. 4 | This script tracks and maps torrent peers rough locations with their IP address and the item being shared, then going onto storing it. 5 | In a sense, this connector allows alot of people to create their own personal "big brother" watching and surverying torrent downloads. 6 | (Although, in reality there are many goverement and busniess entities doing this on a much larger scale) 7 | that being said, i hope anyone using this idea is responible to others privacy. afterall many of these peers are your seeders. 8 | i also hope this idea shows everyone the importance of a VPN Server while on the internet. 9 | no one should ever know your real IP without it being for essential for the task you are trying to complete. 10 | 11 | 12 | Bugs: 13 | i by no means am a coder but i couldnt find a connector anywhere online like this one so i tried to create one 14 | there are bugs and issues in this script. if you find any flaws, put in a GitHub issue and ill work on correcting it. please try to be specific. 15 | if there are any python coders out there reading this and think you could completely rehaul this script? Let me know. 16 | I am not looking into running a github repository and am willing to accept any help. 17 | if you are looking to be a contributer, please place some valid issues in first to prove you know your shit 18 | 19 | --------------------------------------------------------------------------------