Feature Request Checklist
Problem Description
I would like to consume Watchtower update-check results from another service/dashboard.
Today --porcelain v1 provides stable machine-readable text, which is useful, but consumers still need to parse Watchtower-specific text output to answer questions like:
- which containers were checked?
- which containers have an update available?
- which containers are fresh?
- which containers failed or were skipped?
- what image was checked?
I only need a stable JSON representation of the update report.
Desired Solution
Would you be open to a PR that adds stable JSON report output for update checks?
Possible shapes, depending on what you would prefer:
- Add a JSON porcelain format, for example:
watchtower --run-once --monitor-only --porcelain json
Or add a new porcelain version, for example:
watchtower --run-once --monitor-only --porcelain v2
Or expose the most recent / current update report through the HTTP API, for example:
GET /v1/status
The JSON would ideally include per-container results, using Watchtower’s existing result/report data where possible:
{
"containers": [
{
"name": "nginx",
"image": "nginx:latest",
"state": "stale",
"update_available": true,
"error": ""
}
]
}
The exact schema is flexible. I mainly want to ask whether this kind of feature would be acceptable before working on a PR.
Current Alternatives or Workarounds
Parse --porcelain v1 text output externally.
Use notifications/templates and parse the notification payload.
Use the HTTP API summary response, but it does not provide enough per-container update availability detail for dashboard/status use cases.
Use Prometheus metrics, but those are aggregate and do not expose per-container update availability.
Additional Context
--porcelain json seems the cleanest change.`
Feature Request Checklist
Problem Description
I would like to consume Watchtower update-check results from another service/dashboard.
Today
--porcelain v1provides stable machine-readable text, which is useful, but consumers still need to parse Watchtower-specific text output to answer questions like:I only need a stable JSON representation of the update report.
Desired Solution
Would you be open to a PR that adds stable JSON report output for update checks?
Possible shapes, depending on what you would prefer:
watchtower --run-once --monitor-only --porcelain jsonOr add a new porcelain version, for example:
watchtower --run-once --monitor-only --porcelain v2Or expose the most recent / current update report through the HTTP API, for example:
GET /v1/status
The JSON would ideally include per-container results, using Watchtower’s existing result/report data where possible:
{
"containers": [
{
"name": "nginx",
"image": "nginx:latest",
"state": "stale",
"update_available": true,
"error": ""
}
]
}
The exact schema is flexible. I mainly want to ask whether this kind of feature would be acceptable before working on a PR.
Current Alternatives or Workarounds
Parse --porcelain v1 text output externally.
Use notifications/templates and parse the notification payload.
Use the HTTP API summary response, but it does not provide enough per-container update availability detail for dashboard/status use cases.
Use Prometheus metrics, but those are aggregate and do not expose per-container update availability.
Additional Context
--porcelain jsonseems the cleanest change.`