Frigate Integration - how to check health of Frigate

Hi there;

On occasion, my Frigate Docker container half dies. That is, something strange happens with the detect streams and Frigate just gives up.

It keeps about half the recordings, loses others, and all detection stops. I usually only notice after two days when I don’t receive a “Car in the Driveway” notification when I get home.

Is there any possible way of monitoring specific events within Frigate, or any Error Level events within Frigate, that could then be monitored by HA to restart that docker container?

Thanks

blakeblackshear/frigate · Discussions · GitHub is the official Frigate support hub and is another good place to get help with Frigate.

Not sure what that means in terms of the add-on itself.

Maybe you can catch it by checking on stale values for sensor.frigate_cpu_percent or sensor.frigate_memory_percent or with a (per-camera) diagnostics sensor sensor.cam_detection_fps or something similar that’s available for each camera individually?

I restart Frigate every day through an automation - for a reason I forgot long time ago :confused: :

alias: Restart Frigate @04:55h
description: ""
triggers:
  - trigger: time
    at: "04:55:00"
actions:
  - action: hassio.addon_restart
    data:
      addon: ccab4aaf_frigate
mode: single

The HA integration doesn’t give up / fail. Frigate in Docker does. Once it has the error “too many unprocessed streams”, it just stops detecting but throws zero events besides an error in the logs.

The HA integration doesn’t have any way to monitor logs for errors etc. That’s what I’m ideally looking for.

Not sure if you saw that the automation I’m using restarts the add-on, it doesn’t reload the integration - that should be a workaround in your case then.

I assume you could also parse the Frigate logs for this by using grep in a command line sensor, but implementing this is way beyond my skillset.