Commit Graph

377 Commits

Author SHA1 Message Date
Pulse Monitor e66b74ee65 fix: allow password changes when behind proxy Basic Auth (addresses #407)
The password change endpoint now handles both scenarios:
- Direct auth: Uses Authorization header when it contains Pulse credentials
- Proxy auth: Uses currentPassword from JSON body when behind proxy Basic Auth
- Prevents proxy auth from interfering with Pulse's own authentication
- Maintains security by always requiring current password verification
2025-09-04 19:42:49 +00:00
Pulse Monitor a4f40a6162 fix: resolve compilation error and webhook issues
- Fixed undefined 'alert' variable in sendWebhookRequest function
- Dynamic ntfy headers are properly handled in sendWebhook where alert exists
- Cleared corrupted webhooks.enc file
- Webhook testing should now work without JSON parsing errors
2025-09-04 19:06:06 +00:00
Pulse Monitor 635d7c06f4 fix: resolve webhook JSON parsing errors for all services
- Fixed SendEnhancedWebhook to use service-specific payload generation
- Test webhooks now properly skip template-syntax headers
- ntfy and other plain text services correctly skip JSON validation
- Prevents 'invalid character' errors when testing webhooks
- All webhook payload generation now respects service type
2025-09-04 18:55:23 +00:00
Pulse Monitor b8cada0d93 refactor: remove emojis from all webhook templates for professional appearance
- Replaced emoji indicators with plain text (CRITICAL, WARNING, INFO)
- Cleaned up ntfy, Gotify, and Telegram templates
- Removed decorative emojis from alert details
- Updated dynamic header generation to use plain text
- Maintains professional tone appropriate for monitoring software
2025-09-04 18:48:51 +00:00
Pulse Monitor 410d850a1f fix: resolve ntfy webhook test failures with emoji and JSON parsing
- TestEnhancedWebhook now uses generatePayloadFromTemplateWithService to handle service-specific formatting
- ntfy webhooks correctly skip JSON validation since they use plain text
- Dynamic ntfy headers (Title, Priority, Tags) are properly set during testing
- Template-syntax headers with emojis no longer break webhook tests
- Fixes 'invalid character looking for beginning of value' error
2025-09-04 18:41:10 +00:00
Pulse Monitor 4574dad237 fix: resolve 404 error when updating or deleting webhooks
- Fixed webhook ID extraction in UpdateWebhook and DeleteWebhook handlers
- Previous code expected 5 URL parts but path only had 2 after prefix stripping
- Now correctly extracts webhook ID from /api/notifications/webhooks/{id}
- Resolves frontend error when saving webhook changes
2025-09-04 18:24:02 +00:00
Pulse Monitor 3d941b40cc fix: handle ntfy webhook headers dynamically to prevent template syntax errors
- ntfy template headers contained Go template syntax that wasn't being processed
- Added special handling for ntfy webhooks to set Title, Priority, and Tags dynamically
- Headers are now set based on actual alert level and details
- Ignores template-syntax headers from webhook config to prevent errors
- Fixes issue where ntfy webhooks with preset headers would fail to send
2025-09-04 18:14:29 +00:00
Pulse Monitor 753d22b0b3 feat: auto-detect public URL for webhook notifications when not explicitly configured
- Automatically detects the machine's IP address for webhook 'View in Pulse' links
- Checks multiple methods: Proxmox container, outbound IP, Docker, network interfaces
- Falls back through detection methods to find the best IP
- Users no longer need to manually set PULSE_PUBLIC_URL in most cases
- Manual configuration still takes precedence if set
2025-09-04 18:01:18 +00:00
Pulse Monitor 21b168d287 fix: ensure Gotify webhook links use full Pulse URL instead of relative path (addresses #415) 2025-09-04 17:48:00 +00:00
Pulse Monitor 2fe5117936 Revert "chore: bump version to v4.14.0-rc.2"
This reverts commit 12a143d3cd.
2025-09-04 17:38:28 +00:00
Pulse Monitor 9ad5a807b4 chore: bump version to v4.14.0-rc.2 2025-09-04 17:33:16 +00:00
Pulse Monitor fd77419cad chore: bump version to v4.14.0-rc.1 2025-09-04 16:53:04 +00:00
Pulse Monitor 612907394d fix: correctly handle PBS storage as shared when configured
PBS storage should respect Proxmox's shared configuration. When PBS
storage is configured without node restrictions in Proxmox, it appears
as shared storage accessible by all nodes. Updated mock data to match
real cluster behavior where PBS entries appear under 'cluster' group.
2025-09-04 16:25:04 +00:00
Pulse Monitor 8c3a086a13 fix: update mock PBS storage to match production behavior
Mock data now accurately replicates production PBS storage where:
- Each node sees ALL PBS storage entries (pbs-pve1, pbs-pve2, pbs-pve3)
- Storage sizes and usage match production (~950GB, 14% used)
- Each PBS entry has a node-specific namespace but appears on all nodes
- PBS storage is correctly marked as not shared
2025-09-04 15:59:51 +00:00
Pulse Monitor 5deba3cec0 enhance: add PBS storage simulation to mock data
Mock data now properly simulates PBS storage behavior where each node
reports all PBS namespaces (pbs-pve1, pbs-pve2, pbs-pve3). This accurately
replicates real cluster behavior where each node has access to all PBS
namespaces but they're node-specific and not shared.
2025-09-04 15:54:23 +00:00
Pulse Monitor 26e9e9393b fix: PBS storage incorrectly showing on wrong nodes (addresses #403)
PBS storage was being marked as shared when it shouldn't be. Each PBS
namespace is node-specific even when connecting to the same PBS server.
Now PBS storage correctly shows under its respective node instead of
all being assigned to the last node.
2025-09-04 15:49:20 +00:00
Pulse Monitor ce0ecd4ab9 fix: set proper connectionHealth for mock cluster nodes
Mock cluster nodes now correctly show degraded state (yellow) when
some nodes are offline. This properly demonstrates the degraded cluster
functionality for issue #379.
2025-09-04 15:32:45 +00:00
Pulse Monitor 83862eb817 fix: set Online status for mock cluster endpoints
Mock cluster endpoints were showing grey dots because the Online field
wasn't being set based on the node status. Now properly reflects the
node's online/offline status with green/grey indicators.
2025-09-04 15:29:42 +00:00
Pulse Monitor 840d9627a5 feat: add yellow status indicator for degraded cluster connectivity (addresses #379)
When some cluster nodes are offline but the main node can still reach others,
show a yellow status dot instead of red to indicate partial connectivity.
This better represents the actual cluster health state.
2025-09-04 15:24:22 +00:00
Pulse Monitor 70250de0df chore: remove dev build tag and add auth debugging 2025-09-04 15:00:14 +00:00
Pulse Monitor 6cb33f13da feat: add Pushover notification template (addresses #392)
Added built-in Pushover template alongside Discord, Telegram, Gotify, and ntfy. Users can now select Pushover from the service dropdown instead of manually configuring it as a generic webhook.
2025-09-04 13:47:50 +00:00
Pulse Monitor 3650930a23 fix: properly identify VMID 0 PBS backups as Host type instead of LXC (addresses #359)
PMG host configuration backups (VMID=0) are now correctly shown as "Host" type
in the backup list instead of being incorrectly labeled as "LXC" containers.
Also added mock data for testing VMID 0 host backups.
2025-09-04 13:36:40 +00:00
Pulse Monitor 0a66bffb58 fix: alert acknowledgment routing path mismatch (addresses #380)
The acknowledge/unacknowledge/clear endpoints were returning 404 due to incorrect path trimming in HandleAlerts. The router was registered with /api/alerts/ but the handler was trimming /api/alerts, causing path parsing to be off by one character.
2025-09-04 13:06:15 +00:00
Pulse Monitor a999d8b80c fix: ensure PBS backup monitoring is enabled for all PBS instances (addresses #411)
- Added migration to automatically enable MonitorBackups for PBS instances
- This fixes the issue where PBS backups weren't showing for some users
- The migration runs on startup and persists the changes
- All new PBS instances already have MonitorBackups enabled by default
2025-09-04 12:56:38 +00:00
Pulse Monitor 2391329d28 fix: provide full Pulse URL in Gotify/ntfy webhook notifications (addresses #415)
- Added PULSE_PUBLIC_URL config option to specify the full URL to access Pulse
- Updated notification manager to use publicURL when constructing webhook payloads
- Modified prepareWebhookData to construct full URLs instead of just paths
- Fixed test webhooks to use configured publicURL instead of hardcoded values
- Gotify and ntfy notifications now include clickable links that work properly
2025-09-04 12:07:23 +00:00
Pulse Monitor d1703ce4e9 improve: skip Windows System Reserved partitions in disk usage calculation (addresses #414)
- Windows System Reserved partitions now excluded from disk usage
- Added better handling for filesystems with zero total bytes
- Improved debug logging for skipped filesystems
- Prevents incorrect disk usage display for Windows VMs
2025-09-04 10:59:59 +00:00
Pulse Monitor 6d1986271b feat: add custom headers UI for webhook configuration (addresses #412)
- Added custom headers section to webhook configuration UI
- Users can now add, edit, and remove custom headers for authentication
- Updated ntfy instructions to be clearer about adding Authorization headers
- Supports Bearer tokens, API keys, and other custom headers
2025-09-03 16:00:22 +00:00
Pulse Monitor 0b20c1b9f5 chore: bump version to v4.13.0 2025-09-03 13:42:00 +00:00
Pulse Monitor 2a2e281b10 fix: resolve storage display issues (addresses #410, #411, #385)
- Fixed shared storage jumping between nodes on each update by using consistent deduplication
- Shared storage now displays with node="cluster" to indicate it's cluster-wide
- Improved error logging when storage API calls fail to help diagnose permission issues
- Added specific warning when all nodes fail to retrieve storage (helps with #385, #411)

The jumping storage issue (#410) was caused by a race condition where parallel goroutines
would report shared storage under whichever node completed first, causing it to randomly
"jump" between nodes on each polling cycle.
2025-09-03 12:00:52 +00:00
Pulse Monitor f0eadd0c7c fix: storage alerts and UI improvements
- Added CheckStorage calls in parallel storage polling (was missing, causing storage alerts to not trigger)
- Fixed node cleanup logic to use alert.Node field directly instead of parsing IDs
- Removed auto-acknowledge on alert click - now only acknowledge button toggles state
- Added unacknowledge button for acknowledged alerts
- Fixed double-toggle issue with acknowledge button using race condition prevention
- Fixed tab menu width in Alerts and Settings pages (changed flex-shrink-0 to flex-1)

addresses #228 (storage alert threshold issue)
2025-09-03 10:04:37 +00:00
Pulse Monitor e3e554a4ad fix: eliminate gaps in table rows with alert borders
- Replace border-left with inset box-shadow for alert indicators
- Prevents unprofessional gaps between background and table edges
- Add alert support to NodeSummaryTable with same gap-free technique
- Generate offline alerts in mock data for testing
- Fix alert matching to use full resource ID for nodes
2025-09-02 22:22:04 +00:00
Pulse Monitor f8de8d71d8 enhance: optimize default schedule settings for production use
- Enable alert cooldown by default (5 minutes) to prevent notification spam
- Enable rate limiting by default (10 alerts/hour) to prevent flooding
- Enable smart grouping by default (30 second window, group by node)
- Keep quiet hours disabled by default (requires user configuration)
- Keep escalation disabled by default (requires user setup)

These defaults provide sensible protection against notification overload
while allowing users to opt-in to more advanced scheduling features
2025-09-02 21:36:46 +00:00
Pulse Monitor 69598d62f6 enhance: improve mock data realism and alert system
- Add dynamic metric fluctuations for VMs and containers in mock data
- Fix alert acknowledgment to dim instead of hide alerts
- Implement unacknowledge functionality with backend persistence
- Simplify alert UI to single-click toggle (remove selection system)
- Add proper hysteresis for alert resolution when metrics drop
- Fix SVG icon boundaries in alert displays
- Add webhook disable toggles for testing without notifications
- Fix frontend directory duplication issue (addresses frontend-modern recreation)
- Improve alert sorting to show most recent first
- Make mock system generate realistic metric changes for proper alert lifecycle
2025-09-02 21:11:01 +00:00
Pulse Monitor 0e060311a1 fix: increase API timeout to prevent deadline exceeded errors (addresses #408)
- Increased default HTTP client timeout from 30s to 60s
- Added CreateHTTPClientWithTimeout function to properly set custom timeouts
- Updated Proxmox and PBS clients to use configured timeout values
- Increased default connection timeout from 45s to 60s in config

This prevents "context deadline exceeded" errors when connecting to slow or overloaded Proxmox/PBS nodes.
2025-09-01 22:59:32 +00:00
Pulse Monitor 796c4468e8 enhance: make Gotify and ntfy notifications as rich as Discord/Telegram
- added color-coded emoji indicators (🔴/🟡/🟢) for alert levels
- enriched message formatting with better structure and emojis
- improved titles to show resource name and alert type clearly
- ntfy now has dynamic headers for priority and tags based on alert level
- both services now match the detail level of Discord and Telegram
2025-09-01 22:59:32 +00:00
Pulse Monitor af5806122d improve: enhance Gotify notification details and add ntfy to UI (addresses #228)
- improved Gotify template to include resource name and node in message body
- changed title to show resource name instead of generic "Pulse Alert"
- added ntfy service option to frontend webhook configuration UI
- ntfy template was already in backend but missing from frontend selection
2025-09-01 22:59:32 +00:00
Pulse Monitor e72b0c8767 chore: remove temporary auth override used for testing 2025-09-01 22:59:32 +00:00
Pulse Monitor 424d5a9538 fix: change password submit button not working (addresses #396)
- Changed button type from 'button' to 'submit' so it actually submits the form
- This was the root cause - the button looked clickable but had no onClick handler
- Now the form properly submits when clicking Change Password
2025-09-01 22:59:32 +00:00
Pulse Monitor 95d201cfc6 feat: improve VM disk stats handling and documentation
- Add DiskStatusReason field to track why disk stats are unavailable
- Show helpful tooltips in UI explaining specific issues:
  - Proxmox 9 API token limitation (401 on guest agent endpoints)
  - Guest agent not installed/running
  - Special filesystems only (Live ISOs)
  - Permission issues
- Add comprehensive troubleshooting guide (docs/VM_DISK_STATS_TROUBLESHOOTING.md)
- Document that API tokens cannot access guest agent data on PVE 9
- Tested and confirmed: only password/cookie auth works for guest agent on PVE 9
- Update README with quick reference to VM disk stats issue

This addresses issues #348, #367, and #71 by clearly explaining the root cause
(Proxmox API limitation) and providing actionable guidance to users.
2025-09-01 10:16:02 +00:00
Pulse Monitor 87fc4f651e fix: improve node disk stats reliability when GetNodeStatus fails (addresses #402)
- Ensure disk metrics from /nodes endpoint are preserved when GetNodeStatus fails
- Add better fallback logic to prevent showing 0% or '-' for disk usage
- Improve logging to distinguish between rootfs and /nodes endpoint metrics
- Handle cases where neither rootfs nor valid node disk data is available

This fixes the regression introduced in v4.12.1 where disk stats would show as
'-' when GetNodeStatus failed due to network issues or rate limiting
2025-08-31 22:43:32 +00:00
Pulse Monitor c0c5a231e3 chore: bump version to v4.12.1 2025-08-31 21:29:25 +00:00
Pulse Monitor 5ecae10827 fix: storage tab showing empty due to incorrect filtering of cluster storage
- Removed incorrect check that was skipping storage with Enabled==0 at cluster level
- Storage can be enabled at node level even if cluster config shows Enabled==0
- Now properly displays all storage and sets enabled/active flags for UI display
2025-08-31 19:01:36 +00:00
Pulse Monitor eb0f919d01 feat: implement parallel node polling for improved performance at scale (addresses #398)
- Added goroutine-based parallel fetching for VMs, containers, and storage across nodes
- Each node is now polled concurrently instead of sequentially
- Added detailed performance logging showing duration and success/failure counts
- Should significantly improve performance for deployments with 10+ nodes
- Maintains backwards compatibility with existing error handling and retry logic
2025-08-31 18:54:15 +00:00
Pulse Monitor 75ee45e36a chore: bump version to v4.12.0 2025-08-31 18:13:10 +00:00
Pulse Monitor 21d784164a fix: tag indicators now only show for guests that actually have tags
- Added ToFrontend() method to StateSnapshot for proper data conversion
- Modified /api/state endpoint to use frontend-formatted data
- Enhanced WebSocket store to handle tag data transformation consistently
- Ensures tags are properly converted between backend strings and frontend arrays
2025-08-31 18:01:47 +00:00
Pulse Monitor 426f4b274e fix: prevent mock mode from wiping production node configuration
Mock mode was inadvertently clearing real node configuration when toggling.
Added protection to prevent SaveNodesConfig from modifying nodes.enc when
in mock mode. Mock and production data are now completely separated.
2025-08-31 16:48:52 +00:00
Pulse Monitor 68801366d3 fix: properly handle alert IDs with special characters in acknowledge/clear endpoints (addresses #380)
Alert IDs like 'pve1:qemu/101-cpu' contain slashes which were breaking the URL path parsing.
Fixed by finding the /acknowledge or /clear suffix and extracting everything before it,
rather than trying to split by slashes.
2025-08-31 16:24:08 +00:00
Pulse Monitor 903581f66d fix: alert acknowledgement URL parsing (addresses #380)
The acknowledge and clear alert endpoints were incorrectly parsing the alert ID from the URL path, causing 404 errors. Fixed the path extraction logic to properly handle the /api/alerts/{id}/acknowledge pattern.
2025-08-31 16:16:36 +00:00
Pulse Monitor d43e7a97b7 fix: ntfy webhook now sends plain text instead of JSON
- Modified generatePayloadFromTemplate to skip JSON validation for ntfy
- ntfy uses plain text body format, not JSON
- Messages now successfully delivered to ntfy topics
- Headers for title/priority/tags need dynamic templating support (future enhancement)
2025-08-31 16:07:42 +00:00
Pulse Monitor 57d640b605 feat: add ntfy.sh webhook support (addresses discussion #228)
- Added ntfy webhook template with proper payload format
- Updated frontend to include ntfy in service selection
- Supports both ntfy.sh cloud and self-hosted instances
- Uses priority levels, tags, and click actions for rich notifications
2025-08-31 15:51:29 +00:00