Monitoring and health
What each check does, what Healthy, Offline and Unknown mean, and how to tune when a camera changes state.
What a check does
Every monitored camera is checked on its own schedule. A check opens the camera's RTSP stream, confirms that it carries video with a codec, resolution and frame rate, and closes it again. Nothing is recorded or stored except the result.
- Each camera is checked every check interval (60 seconds by default), counted from the end of its previous check.
- A check that gets no answer within the camera's probe timeout (10 seconds by default) fails. The interval is never shorter than the timeout.
- A failed check records why it failed: wrong credentials, refused connection, timeout, no video stream and so on.
Health states
A camera always shows one of three health states:
- Unknown
- No check has decided the camera's state yet, for example just after you add it.
- Healthy
- The latest checks found a working video stream.
- Offline
- Several checks in a row have failed (3 by default). An incident is open.
How a camera moves between them:
- One failed check never makes a camera Offline. The camera keeps its state while Consecutive failures counts up on its page. It becomes Offline, and an incident opens, only when the count reaches the offline threshold.
- An Offline camera must succeed several times in a row (2 by default) to become Healthy again. Its page shows Successes toward recovery. When it recovers, the incident is resolved automatically.
This filters out brief network noise: a single dropped check does not wake anyone up.
Monitored, paused, or paused by the plan limit
Separately from its health, each camera is in one of three monitoring states:
- On
- The camera is checked on its schedule.
- Paused
- You turned monitoring off (Pause monitoring, or Monitor this camera unticked). It is never checked and cannot open incidents. Its last health is kept.
- Paused — plan limit
- You want it monitored, but it is beyond what the current edition allows. See below.
When an installation holds more cameras or sites than its edition allows, OpticWatch monitors the oldest sites and, within them, the oldest monitored cameras, up to the limit. The rest show Paused — plan limit. Nothing is deleted. This happens, for example, when a Pro or Integrator installation runs without a valid license and falls back to Free limits. Everything paused this way resumes on its own when the license is back or the installation fits its limits again. Paused cameras you turned off yourself do not use any of the allowance.
Tune when a camera changes state
Open Settings and find Monitoring. Changes apply as soon as you save, with no restart.
- Mark a camera offline after
- Consecutive failed checks before a camera becomes Offline. Default 3, from 1 to 20.
- Mark a camera healthy after
- Consecutive successful checks before an incident is resolved. Default 2, from 1 to 20.
- Keep check history for
- Days of per-check history to keep. Default 7, from 1 to 365. Incidents and alert delivery history are kept indefinitely.
Higher thresholds react more slowly but ignore more noise. Each camera also has its own check interval and probe timeout, set when you edit the camera.
History
A camera's page lists its Recent checks, newest first, with each result, its duration and any failure reason, and its Incident history. Times are shown in your browser's time zone.
Large installations
OpticWatch runs up to 32 checks at a time by default (1.1.0 ran 8). That keeps up to 500 cameras checked every 60 seconds on schedule, including when a fifth of them do not answer. A smaller installation only runs as many checks as it has cameras due, so the default suits every edition and there is nothing to configure. For the processor and memory each size needs, see Server size.
A camera that does not answer holds one of those checks for its whole probe timeout, so an installation where many cameras are unreachable at once can fall behind. If cameras' last checks fall well behind their interval, raise MONITOR_WORKERS, which takes precedence over the default:
In the OpticWatch folder, add the line to a file named .env, which this creates if it does not exist. In PowerShell:
Add-Content -Path .env -Value "MONITOR_WORKERS=48"In Terminal on macOS or Linux:
echo "MONITOR_WORKERS=48" >> .envThen apply it with docker compose up -d. If the file already has a line for the same setting, edit that line instead of adding a second one.