Skip to content

Bricklogger 0.2.5

Choose a tag to compare

@github-actions github-actions released this 21 Oct 13:31
· 2 commits to main since this release

Bricklogger 0.2.5

Instance health

  • Every source and destination now has a health: ok, degraded or failed. It
    is read off the warnings: every warning code has a severity, and an
    instance's health is the worst severity among the warnings standing on the
    instance, its devices and its points. Its reason is that warning's message,
    with the time it began and how many others stand. A source can thereby be
    running and degraded at once, such as a cloud that refuses its token.
  • The daemon judges much of this itself: a failed instance, a device the
    source reports unreachable (the new warning device_unreachable), a device
    that skips poll rounds, and a stale point.
  • A point is stale (the new warning stale) when its newest observation, a
    value or a null, is older than three times its rule's interval. A source
    instance can set its own limit with stale_after in sources.yaml, a key that
    belongs to the daemon, and a plugin can declare a default for sources whose
    data arrives in bursts.
  • Overall health is degraded while any instance is not ok. /health answers 503
    only while an instance is failed, which includes a spool that drops data, so
    a container is not marked unhealthy over one silent controller.
  • Health is shown on the instance lines of bricklogger status, in
    sources status and destinations status, in a new table of instances on
    the web interface's overview and on its instance screens, in the daily
    summary mail, and through the MCP server. The warning list gains each
    code's severity.

Reliability

  • A source or destination that kept failing for about 17 hours stopped being
    restarted: the restart delay overflowed after 1,024 attempts, the
    supervising thread died, and status went on saying running. The delay now
    stays capped at a minute, and the BACnet/IP source's search backoff likewise.
  • The supervisor catches anything that escapes its loop, and a watchdog
    restarts an instance whose thread has ended without a failure being seen,
    marking it failed with instance_failed.
  • The backoff starts over once an instance has run for a minute without
    failing; the restart count in status keeps the total. Source status gives
    the next retry.
  • Validation and inference of an uploaded model run in a child process, so
    the API keeps answering and collection keeps going while a large model is
    worked on.
  • The BACnet/IP source refreshes a device's last success with every round
    that gets an answer.

For plugin authors

  • The SDK gains, as an addition: WarningCode with its Severity, declared in
    warning_codes on SourceDeclaration and DestinationDeclaration, and
    stale_after on SourceDeclaration. A code raised without being declared
    counts as degraded. Plugins bound to bricklogger>=0.2,<0.3 keep working
    unchanged; a plugin that uses the addition requires bricklogger>=0.2.5,<0.3.