charlie-haley / omada_exporter

Prometheus Exporter for TP-Link Omada Controller SDN.
MIT License
87 stars 14 forks source link

Runtime error: slice bounds out of range #93

Closed papukj closed 3 weeks ago

papukj commented 4 months ago

Hi,

I tried to use this tool in Docker but the container fails to start with the following error message:

panic: runtime error: slice bounds out of range [1:0] goroutine 1 [running]: github.com/charlie-haley/omada_exporter/pkg/api.(*Client).getCid(0xc000182680) github.com/charlie-haley/omada_exporter@v0.13.0/pkg/api/auth.go:64 +0x1fc github.com/charlie-haley/omada_exporter/pkg/api.Configure(0xd28700) github.com/charlie-haley/omada_exporter@v0.13.0/pkg/api/api.go:51 +0x8f github.com/charlie-haley/omada_exporter/cmd.run(0xc000002780?) github.com/charlie-haley/omada_exporter@v0.13.0/cmd/exporter.go:91 +0x136 github.com/urfave/cli/v2.(*App).RunContext(0xc0000076c0, {0xa0ac68?, 0xc0000b6000}, {0xc0000a01f0, 0x1, 0x1}) github.com/urfave/cli/v2@v2.3.0/app.go:322 +0x97c github.com/urfave/cli/v2.(*App).Run(...) github.com/urfave/cli/v2@v2.3.0/app.go:224 github.com/charlie-haley/omada_exporter/cmd.Run() github.com/charlie-haley/omada_exporter@v0.13.0/cmd/exporter.go:60 +0xc25 main.main() github.com/charlie-haley/omada_exporter@v0.13.0/main.go:8 +0x17

Exporter version: 0.13.0 Omada Controller: 5.13.30.8

Please let me know if you need any other details about my setup.

RichieRogers commented 2 months ago

I've just raised an issue for something similar to this using Omada v5.14.20.9 and Exporter v0.13.0, so looks like the exporter doesn't work any more

Thanks, Richie

chjohans commented 1 month ago

I see the same error, hopefully, @charlie-haley will provide a fix.