[os-nextcloud-backup] Add API endpoint for remote backup status / last successful upload
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by tracing the existing /api/core/backup/backups/this endpoint and the os-nextcloud-backup WebDAV PUT upload handling. Determine how a provider-independent status could persist the last attempt and success result, then verify that the proposed API output supports the listed Zabbix monitoring use case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
Currently, there does not seem to be an API endpoint that exposes the status of remote configuration backups, specifically whether the most recent upload to a configured backup provider such as Nextcloud was successful.
The existing endpoint:
/api/core/backup/backups/this
provides information about local configuration revisions, including their timestamp, description and file size. This is useful for determining whether recent local configuration backups exist, but it does not indicate whether a backup was successfully transferred to the configured remote backup provider.
For external monitoring systems such as Zabbix, this makes it difficult to distinguish between:
- a recent local configuration backup existing,
- the remote backup job having run,
- the remote upload having succeeded,
- and the remote backup destination being unavailable or failing.
For example, the Nextcloud backup provider performs the upload via WebDAV PUT and considers HTTP status codes in the 2xx range successful. However, this result does not appear to be exposed through the API or persisted as a status that can be queried by an external monitoring system.
Describe the solution you'd like
It would be useful to have an API endpoint exposing the status of the configured remote backup provider.
For example:
GET /api/core/backup/status
or, if this should be implemented by the individual backup plugin:
GET /api/nextcloud/backup/status
The response could contain information similar to:
{
"provider": "Nextcloud",
"enabled": true,
"last_attempt": "2026-09-30T04:05:02+02:00",
"last_success": "2026-09-30T04:05:03+02:00",
"success": true,
"filename": "config-20260930.xml",
"remote_path": "OPNsense/config-20260930.xml",
"http_status": 201,
"message": "Backup successfully uploaded"
}
At minimum, the following information would be sufficient for monitoring purposes:
- configured backup provider
- timestamp of the last backup attempt
- timestamp of the last successful backup/upload
- success/failure state of the last attempt
- optional error/status message
Ideally, the concept could be implemented generically so other remote backup providers can expose their status through the same API rather than introducing provider-specific monitoring interfaces.
This would allow external monitoring systems such as Zabbix to retrieve the backup status directly through the OPNsense API and implement triggers such as:
OK: last successful remote backup < 24 hoursWARNING: last successful remote backup > 24 hoursHIGH: last successful remote backup > 48 hoursHIGH: most recent upload attempt failed
The timestamps could be exposed as Unix timestamps and/or ISO 8601 values, making them straightforward to process using Zabbix preprocessing and trigger expressions.
It would also make it possible to distinguish a remote backup failure from the absence of recent local configuration changes.
Describe alternatives you've considered
One alternative is to query:
/api/core/backup/backups/this
and use the timestamp of the newest local configuration revision.
However, this only verifies that a local configuration revision exists. It does not verify that the revision was successfully uploaded to the remote backup destination.
Another alternative is to query the Nextcloud server directly via WebDAV PROPFIND and inspect the modification timestamp of the latest remote backup file.
While this verifies the actual remote state, it requires the Zabbix server/proxy to have separate credentials and connectivity to the backup destination. It also duplicates some of the logic already implemented by the OPNsense backup provider.
Another possibility is monitoring the OPNsense system log for failed WebDAV PUT operations. This can detect individual failures, but does not provide a reliable current state such as "last successful remote backup was X hours ago".
Additional context
The concrete use case is monitoring OPNsense configuration backups with Zabbix.
Ideally, Zabbix should only need access to the OPNsense API and should not require additional credentials for the configured backup destination.
For the Nextcloud backup provider, OPNsense already knows whether an upload succeeded because the provider evaluates the HTTP response from the WebDAV PUT request. Persisting the timestamp/result of the last attempt and exposing this information through the API would make this state available to monitoring systems without requiring them to independently access Nextcloud.
This could, for example, be consumed by a Zabbix HTTP agent item with JSONPath preprocessing to create dependent items for last_success, success, http_status, etc.
A provider-independent status interface would be especially useful, as monitoring systems could then verify remote backup health without needing implementation-specific knowledge or credentials for each individual backup backend.
- Lingua principale
- PHP
- Stelle
- 1.2k
- Fork
- 905
- Merge medio
- 4g 12h
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opnsense/plugins
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
security/tailscale: add description to restart serviceForse già presa @drpsyko101 l’ha presa 6 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
security/acme-client: missing accounts directory causes DNS-01 validation failureForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertasupport
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opnsense/plugins#5770 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
security/tor: Advanced mode / help toggles are brokenForse già presa @txr13 l’ha presa 48 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
os-opnproxy 1.0.5_5Apertaincomplete
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opnsense/plugins#5710 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opnsense/plugins
Issue simili
-
Captured slideshow pass overwrites the route path, aborting compose with a rebind() TypeErrorAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Automattic/blocks-engine#5003 ·
I maintainer di solito rispondono entro 1 giorno
-
from-cloud mythic tracked
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
MythicalLTD/FeatherPanel#459 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: PostgreSQL backend: Queue.remove() / Job.remove() never emit the QueueEvents "removed" eventForse già presa @1AbdullahButt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
taskforcesh/bullmq#5085 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
shukiv/jabali-panel#2423 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100