parkpow / deep-license-plate-recognition

Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.
https://platerecognizer.com/
MIT License
523 stars 122 forks source link

stream_monitor.py ignores log content #210

Closed msjonker closed 3 months ago

msjonker commented 3 months ago

Currently, stream_monitor.py just parses the log lines and looks to see if there are recent logs for cameras, regardless of what the log messages actually are. There are times where the log for a camera is actually an error, such as:

INFO:ingress-north:2024-07-16T13:31:45+00:00: URL unreachable. Will attempt to reconnect in 403.2 seconds

In this cases such as this, stream_monitor will return that the camera is running, when it is not.

As I've stated before, it would be great if this monitor was part of the Stream image itself and did not rely on having to parse docker logs and end up with issues like this, as well as have to spin up a separate container just to run this.

adolfoarmas commented 3 months ago

@msjonker does /status/ endpoint work for you instead of stream_monitor script? See details in the documentation: https://guides.platerecognizer.com/docs/stream/monitoring/#monitor-using-heartbeat-server

It is available from version 1.51.0

msjonker commented 3 months ago

We don't have 1.51.0+ running at our sites yet, but this looks like exactly what I'm looking for! Thanks @adolfoarmas!