Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature Request]: Minimal Public API for monitoring and Zabbix integration (Discovery & Status) #1220

@ziotibia81

Description

@ziotibia81

I would like to request the implementation of a minimal set of public (or better if token-authenticated) API endpoints to query the status of Backrest plans and operations.

The primary goal is to allow external monitoring tools, specifically Zabbix, to:

  1. Automatically discover configured backup plans (LLD - Low Level Discovery).
  2. Monitor the status of the latest operations (Success/Failure, duration, last run time).

Use Case

In professional environments, it is crucial to centralize backup alerts. While Backrest supports notifications (Discord, Shoutrrr, etc.), a pull-based API is necessary for Zabbix to:

  • Create dashboard items automatically for each new backup plan.
  • Trigger alerts if a backup hasn't run in X hours or if the last exit code was non-zero.

Proposed Endpoints (Minimal Set)

A simple JSON output for the following would be ideal:

  1. GET /api/v1/plans: Returns a list of all configured plans (name, ID, description).
  2. GET /api/v1/status: Returns a summary of the latest execution for each plan, including:
    • Plan ID
    • Last run timestamp
    • Last run duration
    • Last run status (Success/Error)
    • Error message (if applicable)

Additional Context

Currently, Backrest is an amazing orchestrator, but integrating it into a broader monitoring ecosystem is difficult without a stable entry point for scripts. Providing a simple JSON response would make Backrest "enterprise-ready" for those using Zabbix, Prometheus (via script exporter), or Nagios.

Thank you for your great work on this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions