Closed
Description
Describe the bug
When I add influxdb2 to the config file I can no longer run the scan.
To Reproduce
Add to config file:
stats: # These will slow down the runtime substantually, but... DATA
influxdb2:
url: "http://192.168.x.x:8086"
token: "APIKEY"
org: "org"
bucket: "checkrr"
Then click run now.
I get the below error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb0 pc=0xce66be]
goroutine 15 [running]:
github.com/aetaric/checkrr/features.(*Stats).FromConfig(_, {{0x177bde0, 0x1}, {0x0, 0x0, 0x0}, {0x1793cc0, 0x1fb95e0}, {0x0, 0x0, ...}, ...})
/Users/aetaric/src/checkrr/features/stats.go:90 +0x4be
github.com/aetaric/checkrr/check.(*Checkrr).Run(0xc000192300)
/Users/aetaric/src/checkrr/check/checkrr.go:57 +0x1c5
created by github.com/aetaric/checkrr/webserver.runCheckrr in goroutine 52
/Users/aetaric/src/checkrr/webserver/webserver.go:218 +0x5f
In looking at the stats.go file on line 90 the line is:
s.writeAPI2 = s.influxdb1.WriteAPIBlocking(influx.GetString("org"), influx.GetString("bucket"))
I think that should have influxdb2 instead of 1?