wymangr / blueiris_exporter

Prometheus Exporter for Blue Iris
MIT License
17 stars 2 forks source link

[Windows .exe] panic: runtime error: index out of range [1] with length 0 #1

Closed BananaHammock743 closed 2 years ago

BananaHammock743 commented 2 years ago

I'm having issues setting this up with the Windows .exe executable. Sorry in advance, I'm not a prometheus power user, or Github regular so I'll try my best.

My log location is C:\BlueIris\log however when I add that to the cmd line I get an error when navigating to http://localhost:2112/metrics image

Steps to replicate:

  1. new command window with the command blueiris_exporter-amd64.exe --cameras=letterboxes --logpath=C:\BlueIris\log, then execute image
  2. On a browser open http://localhost:2112/metrics
  3. In the cmd window a fatal error shows up, and the browser errors out image

Interestingly if I use an incorrect log path (eg. C:\BlueIris\loglogloglog) then instead of fatal error, a warning shows in the cmd window and the browser shows some /metrics info (obviously missing the BI log info as the log path is wrong). image

Happy to provide whatever extra detail would be helpful

Windows 10 Pro 21H2

wymangr commented 2 years ago

Hi @BananaHammock743, could you upload the latest log file and I'll take a look!

wymangr commented 2 years ago

@BananaHammock743 I was able to reproduce the issue and have pushed up a fix that should get around it and shine some light on what line of the log it's unable to parse. You can download the updated version here.

If you could still upload your latest Blue Iris log file, that would be greatly helpful! As well as any output to the console when you try run the new version. The new version also depreciated the --cameras option ( It was not needed ) and it looks like you are using the default log path, so you should be able to start it up without any command line arguments. Just blueiris_exporter-amd64.exe. If you could also send over what version of Blue Iris you are using, that would be helpful as well!

P.S. Thank you for the all the details you provided!!

wymangr commented 2 years ago

@BananaHammock743 I found that in older versions of Blue Iris, they logged the AI timings differently. I just pushed up an update that should add support for older versions of Blue Iris. Let me know if it fixed your issue!

v1.0.4

BananaHammock743 commented 2 years ago

Looking good with v1.0.4. Have got it working now. cmd window not fatal erroring, and http://localhost:2112/metrics showing data as expected.

Happy to close this issue.