Commit Graph

4826 Commits

Author SHA1 Message Date
rcourtman
a210b01a03 fix(sso): load SSO config at startup and expose providers on login page
r.ssoConfig was never loaded from persistence in NewRouter(), so on every
restart all SSO providers were silently discarded (handleListSSOProviders
would reinitialize to an empty config on the first request).

Also adds ssoProviders to /api/security/status so the login page can
render SAML/OIDC login buttons for enabled providers.

Fixes part of #1255

(cherry picked from commit 395cd101ff4acb1b7f89ec3d907b84cbec217dc8)
2026-02-18 12:53:15 +00:00
rcourtman
43af70ca1f fix(patrol): skip alert triggers when Patrol is disabled
TriggerPatrolForAlert was enqueuing into adHocTrigger regardless of
whether Patrol was enabled. With patrolLoop not running (disabled),
nothing drained the channel — it filled on the 10th alert and spammed
"Patrol trigger queue full, dropping trigger" on every subsequent alert.

Read p.config.Enabled in the same RLock as triggerManager and return
early when disabled.

Fixes #1258

(cherry picked from commit 69f399469538f0c9cd59084f6429fed8a793c042)
2026-02-18 12:53:12 +00:00
rcourtman
df23d80919 fix(alerts): always send recovery notifications regardless of quiet hours
Recovery (all-clear) notifications were being silently suppressed during
quiet hours for any non-critical alert. Since powered-off alerts default
to Warning level, users who received an alert at 2pm would never get the
recovery notification if the VM came back during quiet hours.

Quiet hours are intended to suppress noisy firing alerts, not to hide
the fact that an issue has resolved. If you got the alert, you should
always get the all-clear.

Remove the ShouldSuppressResolvedNotification gate from handleAlertResolved.
The notifyOnResolve toggle (explicit user preference) is still respected.

Fixes #1259
2026-02-18 12:53:09 +00:00
rcourtman
6f156cd211 fix: exit agent when exec fails after binary replacement during auto-update
When syscall.Exec() fails after the binary has already been atomically
replaced on disk, the old process would log an error and keep running
indefinitely with stale code. The next update check (1 hour later) sees
the on-disk version matches the server and skips the update — so the
restart is never retried.

Now the agent exits with code 1 when this happens, allowing systemd (or
any service manager) to restart it with the new binary. This fixes the
"temperature broken after each upgrade" reports where users had to
manually reinstall the agent after every Pulse server upgrade.

Fixes #1247
v5.1.9
2026-02-11 14:26:14 +00:00
rcourtman
2fb6ebc25f fix: add SAML auth bypass and update route inventory tests
The SAML route registration (bee3d05f) was incomplete: the auth
middleware uses exact-match for public paths, so /api/saml/{id}/login
etc. would be blocked. Add prefix-based auth bypass for /api/saml/
paths and update route inventory tests for both SSO and SAML routes.
2026-02-11 13:48:16 +00:00
rcourtman
c2d2e7de0e fix: run retention before auto-vacuum migration to reduce VACUUM cost
VACUUM creates a full copy of the database. Running retention first
deletes stale data (5GB → ~60MB live), so the VACUUM copies far less
data — faster startup and much less temporary disk space needed.
2026-02-11 13:37:29 +00:00
rcourtman
06a9f9694f fix: migrate existing metrics databases to incremental auto-vacuum
The auto_vacuum(INCREMENTAL) pragma from the previous commit only takes
effect on new databases. SQLite requires a full VACUUM to restructure
existing files when switching from NONE to INCREMENTAL. Without this,
users upgrading from bloated 5GB+ databases would never reclaim space.

Adds a one-time migration on startup that detects the current auto_vacuum
mode and runs VACUUM to convert if needed. Subsequent startups skip the
migration since the mode is already INCREMENTAL.
2026-02-11 13:35:03 +00:00
rcourtman
bee3d05f0d fix: register SAML login flow routes (login, ACS, metadata, logout, SLO)
The SAML handler functions existed but were never registered in
setupRoutes(), causing 404s for all SAML authentication flows.
Adds /api/saml/ prefix route with dispatcher for all 5 endpoints.
2026-02-11 13:29:05 +00:00
rcourtman
89969079b9 fix: register SSO provider API routes
The SSO handler functions and frontend were implemented but the HTTP
routes were never registered in setupRoutes(), causing 404 on all
/api/security/sso/providers endpoints.

Fixes #1248
2026-02-11 13:17:51 +00:00
rcourtman
2735204638 fix: skip ambiguous shared-storage backups when VMID exists on multiple instances
When two standalone (non-clustered) PVE hosts share the same storage (NFS,
etc.), both instances see the same backup files during polling. Each instance
creates its own StorageBackup entry, causing guests with the same VMID on
different hosts to incorrectly show each other's backups.

Detect shared-storage duplicates by checking if the same volid appears across
multiple instances. When it does AND the VMID is ambiguous (exists on multiple
instances), skip the backup in SyncGuestBackupTimes rather than guessing which
instance owns it. This uses the same ambiguity pattern already applied to PBS
backups.

Fixes #1177
2026-02-11 11:07:28 +00:00
rcourtman
d4ff967815 fix: scope shared storage aggregation to per-instance to prevent cross-instance merging
The shared storage deduplication key was just the storage name, causing
storages with the same name from different Proxmox instances (or PVE + PBS)
to be incorrectly merged into a single entry. This made one random host
appear to have all storages from all instances.

Include the instance name in the aggregation key so shared storage is only
merged within the same Proxmox cluster/instance.

Fixes #1246
2026-02-11 09:18:09 +00:00
rcourtman
2ba590d994 fix: fall back to SMART attributes 194/190 for disk temperature
When the top-level temperature.current field is 0 or missing (common
on some SATA drives), temperature was reported as 0°C with no fallback.
Now extracts temperature from ATA SMART attribute 194 (Temperature_Celsius)
or 190 (Airflow_Temperature_Cel) as a fallback.

Fixes #1243
2026-02-11 09:09:55 +00:00
rcourtman
284bdd7ade fix: prevent metrics.db bloat with automatic vacuum and WAL checkpointing
The metrics database could grow to 5GB+ for modest setups because:
1. Retention deletes rows hourly but SQLite never reclaims the space
2. WAL file grows unbounded without explicit checkpointing
3. No cleanup runs on startup, so restarts accumulate stale data

Fixes:
- Enable auto_vacuum=INCREMENTAL so deleted pages can be reclaimed
- Run incremental_vacuum after each retention cleanup
- Force WAL checkpoint(TRUNCATE) after deletes to prevent WAL bloat
- Run retention on startup to clean stale data immediately

Expected DB size for a 50-resource setup drops from 5GB+ to ~60-70MB.

Ref: GitHub Discussion #1231
2026-02-10 23:13:32 +00:00
rcourtman
0787388ae7 chore: bump version to 5.1.8 v5.1.8 2026-02-10 21:55:08 +00:00
rcourtman
03939c3f9e fix: deduplicate bind-mounted volumes in disk total calculation
The dedup logic only handled btrfs/zfs subvolumes, but Kubernetes
bind-mounts the same device at both pod and plugin paths, causing
xfs/ext4 volumes to be double-counted. Now deduplicates by
device+totalBytes for all filesystem types.

Fixes #1158
2026-02-10 21:52:25 +00:00
rcourtman
42c01c1be5 fix: probe all guest IPs for reachability, not just first
Patrol only pinged the first IP address of each VM/container, causing
false "unreachable" reports for guests with multiple IPs (common with
Windows VMs that have IPv6 or multi-adapter setups). Now probes all
IPs and marks reachable if any responds.

Fixes #1215
2026-02-10 21:46:11 +00:00
rcourtman
6140cb5be4 fix: auto-default discovery interval to 24h when enabled
When users enable AI discovery without setting an interval, the
default of 0 silently stays in manual-only mode. Now normalizes
0 to 24h on save so discovery actually starts automatically.

Fixes #1225
2026-02-10 21:45:59 +00:00
rcourtman
ad97f19cbf fix: add trailing slash to profile API URLs to prevent POST→GET redirect (#1212)
Go's ServeMux 301-redirects /api/admin/profiles to /api/admin/profiles/
when the pattern is registered with a trailing slash. The fetch() API
follows 301 by changing POST to GET (per HTTP spec), so the create
request silently became a list request — returning 200 OK without
actually creating anything.
2026-02-10 21:32:34 +00:00
rcourtman
a6bc55428c fix: load system settings for proxy auth and OIDC users with local theme (#1219)
The proxy auth and OIDC initialization paths skipped loading system
settings when the user had a local theme preference in localStorage.
This meant shouldHideDockerUpdateActions() always returned false,
so the "Update All" button showed even when disabled server-side.

Add the same else branch that the standard login path already has,
which loads system settings asynchronously regardless of theme pref.
2026-02-10 21:20:17 +00:00
rcourtman
ae4632b5b5 fix: correct UpdateAlertDelayHours doc comment (0 normalizes to 24, -1 disables) 2026-02-10 21:13:12 +00:00
rcourtman
a68e0050f8 fix(docker): use manual CPU delta tracking instead of stale PreCPUStats (#1229)
Docker's one-shot stats API (stream=false) returns PreCPUStats from the
daemon's internal cache, which many Docker versions don't update between
non-streaming reads. This causes every call to return the same stale
PreCPUStats from container start, producing a constant lifetime-average
CPU% (e.g. 3.4%) instead of current usage.

Switch to always using manual delta tracking, which stores the previous
sample from our own reads and computes accurate deltas between collection
cycles. The first cycle returns 0 while establishing a baseline; all
subsequent cycles produce correct current CPU percentages.
2026-02-10 20:49:29 +00:00
rcourtman
47ceffe0c2 fix(smart): parse raw.string instead of raw.value for SATA attributes (#1239)
Seagate drives pack vendor-specific data in the upper bytes of the
48-bit SMART raw value, causing Power_On_Hours to report billions of
years instead of the actual value. Use smartctl's raw.string field
(e.g. "16951 (223 173 0)") and extract the first integer, which is
the correct interpretation. Falls back to raw.value when the string
is empty or non-numeric.
2026-02-10 20:42:15 +00:00
rcourtman
c3c7bdf4a4 fix(ui): wrap NodeSummaryTable and HostsOverview with ScrollableTable for mobile (#1196)
NodeSummaryTable and HostsOverview used raw overflow-x-auto divs with
min-width: 800px, causing column overlap on narrow screens. Wrap both
with ScrollableTable and bump min-width to 1000px to match actual
column totals. Also bump DockerHostSummaryTable min-width from 800px
to 920px to match its column widths.
2026-02-10 19:24:03 +00:00
rcourtman
26776b2075 fix(agent): apply --disk-exclude to Docker agent disk metrics (#1237)
The Docker agent was not passing the disk exclusion list to
hostmetricsCollect(), so excluded mounts appeared in the Docker tab
disk totals. Also add server-side fsfilters filtering to Docker
report processing for parity with the host agent path.
2026-02-10 16:59:35 +00:00
rcourtman
dea68a7521 fix(ui): change memory balloon segment color from yellow to blue (#1193)
Cherry-pick c2daf4b1 from main. Yellow was confusing users as it
matched the warning threshold color.
2026-02-10 12:57:30 +00:00
rcourtman
47adcbd8af feat(agent): add FreeBSD S.M.A.R.T. disk collection support (#1236)
Relax the Linux-only gate on SMART collection to also run on FreeBSD.
Add FreeBSD disk discovery via sysctl kern.disks (lsblk is Linux-only).
The smartctl invocation and JSON parsing are already platform-agnostic.
2026-02-10 12:44:15 +00:00
rcourtman
120a1032d6 chore(release): bump version to 5.1.7 v5.1.7 2026-02-10 09:24:59 +00:00
rcourtman
72ccd2f839 fix(ui): prevent Docker host summary column overlap on mobile (#1223, #1196)
The host summary table used minWidth='100%' on mobile, forcing 8 columns
into ~375px with table-layout:fixed. This made HOST and Uptime headers
overlap into "HOSTIIME". Set mobileMinWidth to 800px so the table scrolls
horizontally instead of crushing columns.
2026-02-09 23:30:04 +00:00
rcourtman
f7a14feb0f fix(mock): align Docker container store type with real monitor
Mock seeding wrote Docker container metrics as "docker" but the real
monitor uses "dockerContainer". This made mock-mode charts miss the
SQLite store path after the API normalization fix in 7336ec2d.
2026-02-09 22:42:08 +00:00
rcourtman
97f844e19e fix(ui): make Show All columns actually show all including IP/OS (#1222)
resetToDefaults() was restoring defaultHidden (which includes os, ip)
instead of clearing the hidden list. The button says "Show all" so it
should set hiddenColumns to [] rather than reverting to defaults.
2026-02-09 22:35:11 +00:00
rcourtman
e06ebb1bb7 fix(ui): set versionInfo on cached update path so agent badges work (#1228)
When checkForUpdates used cached data, it returned without setting
updateStore.versionInfo. This caused getServerVersion() to return
empty, making checkAgentVersion() skip the comparison and report all
agents as up-to-date (green) regardless of their actual version.
2026-02-09 22:33:56 +00:00
rcourtman
7336ec2d87 fix(metrics): normalize docker resource type in metrics history API (#1229)
Frontend sends resourceType="docker" but the SQLite store uses
"dockerContainer". The /api/metrics-store/history handler now
normalizes the alias so queries return the correct historical data
instead of falling back to a single live data point.
2026-02-09 22:33:24 +00:00
rcourtman
79016ec1b0 fix(ui): add missing v prefix to release download URLs (#1232)
UpdateBanner release-tag links were already fixed; this also fixes
the manual download commands in UpdatesSettingsPanel which were
generating 404 URLs (missing v in both the tag path and asset filename).
2026-02-09 22:23:38 +00:00
rcourtman
c92ccc122e fix(state): deduplicate PVE nodes and AI mention resources (#1217, #1214)
Backend: nodes with the same logical identity (cluster+name) are merged
using a health-weighted preference, preserving host-agent links across
node-ID churn.

Frontend: extract buildMentionResources() with alias-based dedup so
docker hosts and standalone host agents sharing an ID/hostname appear
once in the @ mention autocomplete.
2026-02-09 22:19:55 +00:00
rcourtman
815c990e85 fix(proxmox): avoid 403 on apt update checks 2026-02-09 20:28:09 +00:00
rcourtman
9e8d702a18 chore(release): bump version to 5.1.6 v5.1.6 2026-02-09 14:00:53 +00:00
rcourtman
721be9bce6 fix(config): honor legacy env aliases for docker update-action toggle (#1219) 2026-02-09 14:00:24 +00:00
rcourtman
2d78cf4e84 fix(dashboard): restore guest URL add/edit controls in table rows (#1221) 2026-02-09 14:00:15 +00:00
rcourtman
cedf0c8f0f fix(temperature): parse string sensor values without zeroing readings (#1224) 2026-02-09 14:00:09 +00:00
rcourtman
0d6fffbb1c fix(servicediscovery): run automatic refresh for changed/stale resources (#1225) 2026-02-09 14:00:02 +00:00
rcourtman
1f74c12ef8 fix(alerts): preserve docker update delay across host identity churn (#1226) 2026-02-09 13:59:52 +00:00
rcourtman
8036d9c3fd Improve issue triage with version-aware automation 2026-02-08 19:28:24 +00:00
rcourtman
8a48acef1d fix: hotfix 5.1.5 — node duplication, alert scrambling, ntfy resolved formatting
- fix(models): filter nodes by instance in UpdateNodesForInstance to prevent
  PVE node duplication across poll cycles (#1214, #1192, #1217)
- fix(alerts): sort GetActiveAlerts output for stable ordering, preventing
  hostname scrambling in frontend (#1218)
- fix(notifications): add ntfy-specific resolved webhook formatting with
  plain-text body and proper headers (#1213)
- fix(frontend): respect "hide Docker update actions" setting in
  DockerFilter Update All button (#1219)
- fix(frontend): add missing v prefix to GitHub release tag URLs (#1195)
- fix(monitoring): reduce disk detection warning from Warn to Debug to
  eliminate log spam for pass-through disks (#1216)
- chore: bump VERSION to 5.1.5
v5.1.5
2026-02-08 11:48:22 +00:00
rcourtman
d1e61d8a8a fix: ship alerting hotfixes and prepare 5.1.4 v5.1.4 2026-02-07 22:05:55 +00:00
rcourtman
3d0082c07e chore: update dev paths to /Volumes/Development
Migrated hardcoded paths from ~/Development to /Volumes/Development.
2026-02-07 19:20:37 +00:00
rcourtman
839ed5cc1e docs(release): finalize hotfix 5.1.3 checklist and version bump v5.1.3 2026-02-07 14:18:53 +00:00
rcourtman
f253ed2778 fix(license): harden release key validation and fingerprint logging 2026-02-07 14:18:44 +00:00
rcourtman
6909264a02 fix(alerts): reduce swarm alert noise and preserve notification state (#1096) 2026-02-07 14:18:39 +00:00
rcourtman
13af83f3fc fix(monitoring): preserve recent PVE nodes on empty polls (#1094) 2026-02-07 14:18:33 +00:00
rcourtman
c949e9c9f9 Auto-update Helm chart version to 5.1.2 v5.1.2 helm-chart-5.1.2 2026-02-04 23:16:55 +00:00