project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

[Bug] PegaProx does not show notification targets with the Proxmox Backup Server integration

Open nvaert1986 opened this issue 2 months ago • 3 comments

Describe the bug

PegaProx does not show notification targets with the Proxmox Backup Server integration and shows unknown - instead. Note that I am using webhooks, so that might influence it?

Steps to Reproduce

  1. Login to a PegaProx instance where a Proxmox Backup Server is configured
  2. Check the Targets

Expected behavior

The targets should be shown.

Environment

  • PegaProx Version: 1.1.1
  • Installation Method: Manual
  • **OS:**Debian 13
  • Browser: Mozilla Firefox 155.0.1 and Google Chrome 151.
  • Behind Reverse Proxy? No
  • UI? Corporate

Logs

Not Applicable


Screenshots

Image

Checklist

  • [X] I have searched existing issues to make sure this is not a duplicate
  • [X] I am using the latest version of PegaProx

nvaert1986 avatar Sep 10 '26 12:09 nvaert1986

This one is in, and has been for a while — the PBS detail view fetches /notifications and renders both targets and matchers.

There is a catch that probably explains what you saw: the whole block is conditional on the list being non-empty, so a PBS with no targets configured shows nothing at all, not even an empty section. That is our fault for having no empty state, but it is not the same as "not supported".

So: does the PBS in question actually have notification targets configured (Configuration > Notifications on the PBS itself)? If yes and they still do not appear, that is a real bug and I want to see it. If no, the missing empty state is the thing to fix and I will take that.

— MK

mkellermann97 avatar Sep 10 '26 13:09 mkellermann97

Found it, and it was our bug rather than anything to do with webhooks — it would have looked the same for all four target types.

We were listing the targets from /config/notifications/endpoints. That path is an index node in the PBS API, not a data one: its GET is declared to return null and its children are the four per-type paths (gotify, sendmail, smtp, webhook). So what came back was a directory listing with no name and no type on it, and the UI rendered each entry as exactly what you screenshotted — the type badge fell back to "unknown" and the name to "-".

The list with real entries lives at /config/notifications/targets, which returns name, type, origin and the disabled flag across all four types at once. That is what we read now. The per-type endpoints/<type> paths were always correct for create/update/delete, so only the listing was wrong.

Two related things fixed while in there, both of which would have made this harder to report:

  • The cards disappeared entirely when a list came back empty, so "nothing configured" and "we could not read it" looked identical, and both looked like the feature was missing. Each card now stays put and says which of the two it is.
  • If PBS refuses one of the two reads, we now say which one instead of quietly showing an empty list.

On Testing, ships in the next release. Verified against a server returning the real target shape: sendmail mail-to-root, webhook ops-webhook, gotify gotify-oncall (disabled) all render with their names and types.

Thanks for the screenshot — "unknown -" rather than "empty" is what pointed at the field names.

mkellermann97 avatar Sep 10 '26 15:09 mkellermann97

Same release, same underlying cause as your syslog one: a refused read came back looking like an empty list, so the notification targets rendered as none. Guarded the same way now.

Marcus

mkellermann97 avatar Sep 21 '26 07:09 mkellermann97