Commit Graph

987 Commits

Author SHA1 Message Date
Pulse Monitor fe75d54cd6 Revert "improve: clarify disk column header to show it represents used space (addresses #446)"
This reverts commit de6051a7d7.
2025-09-11 08:56:49 +00:00
Pulse Monitor 350420ec7e improve: clarify disk column header to show it represents used space (addresses #446) 2025-09-11 08:56:03 +00:00
Pulse Monitor 9486e8679d improve: enhance VM disk usage detection for Windows guests (addresses #416)
- Add debug logging to guest agent filesystem API responses
- Better handle Windows drive mountpoints (C:\, D:\, etc.)
- Improve empty filesystem list detection and logging
- Add specific handling for Windows filesystems that may report differently

This should help diagnose why some VMs with guest agents installed still show 0% or missing disk usage, particularly on Windows systems.
2025-09-11 08:47:23 +00:00
Pulse Monitor 1a147bec86 revert: version back to 4.15.0-rc.4 2025-09-11 07:36:48 +00:00
Pulse Monitor b4c7240865 chore: bump version to v4.15.0-rc.5 2025-09-11 07:33:12 +00:00
Pulse Monitor d4f87a6230 feat: add physical disk diagnostics to help troubleshoot missing disks (addresses #429)
- Add comprehensive disk detection diagnostics to /api/diagnostics
- Shows which nodes return disks and which don't
- Provides specific error messages and API responses
- Includes targeted recommendations based on failure type
- Helps users provide better debugging info when reporting issues
2025-09-11 07:28:15 +00:00
Pulse Monitor 23b2377c77 improve: enhance disk polling error logging to help diagnose missing disks (addresses #429)
- Add specific warning for permission errors (401/403)
- Add info message for nodes without disk monitoring support
- Elevate error logging from debug to warn level for visibility
- Helps users understand why disks might not appear for certain nodes
2025-09-11 07:20:17 +00:00
Pulse Monitor d9a6859fbd fix: remove debug code that bypassed authentication in Docker builds (addresses #428)
Debug code was accidentally left in v4.15.0-rc.3 that skipped authentication
entirely, preventing the login screen from appearing. This affected Docker
deployments where authentication was expected.

- Removed early return that bypassed auth checks
- Restored proper isLoading initial state
- Removed WebSocket early initialization
- Cleaned up debug console.log statements
2025-09-11 07:12:24 +00:00
Pulse Monitor 401168cf5c fix: update Dockerfile to use Go 1.24 for compatibility 2025-09-10 21:43:35 +00:00
Pulse Monitor 2c512a96e3 chore: bump version to v4.15.0-rc.4 2025-09-10 21:38:46 +00:00
Pulse Monitor a9714e62f6 fix: improve WebSocket connection reliability in dev environment
- Increase WebSocket buffer sizes from 64KB to 4MB to handle large mock data
- Add robust reconnection logic with exponential backoff
- Implement heartbeat mechanism to detect stale connections faster
- Add manual reconnect button in UI when connection fails
- Fix unused variable warnings in monitor code
- Add debug logging to trace WebSocket state initialization

This resolves the issue where the frontend would hang after code changes
during hot-reload, especially when using mock mode with many nodes.
2025-09-10 21:35:20 +00:00
Pulse Monitor 94943ea847 fix: preserve storage/backup data for temporarily offline nodes (addresses #429)
- Storage polling now preserves existing data when nodes are temporarily offline
- Backup polling preserves existing backups for unpolled nodes
- Prevents storage and backups from disappearing when nodes have connectivity issues
- Similar to the physical disk preservation fix
2025-09-10 20:59:46 +00:00
Pulse Monitor 71697f63bf fix: preserve config files during reinstalls to prevent threshold loss (addresses #429)
- Modified install.sh to avoid recursive chown on /etc/pulse during reinstalls
- This prevents custom thresholds in alerts.json from being lost during updates
- Only changes directory ownership, not existing file permissions
- Explicitly preserves permissions on critical config files
2025-09-10 20:54:07 +00:00
Pulse Monitor 9d905a356c fix: preserve physical disk data for temporarily offline nodes (addresses #429)
When a node is temporarily offline or has connectivity issues, preserve its last known physical disk data instead of removing it from the table. This prevents nodes from disappearing from the Physical Disks table when they have transient connection problems.
2025-09-10 20:44:51 +00:00
Pulse Monitor 110cb3b11c chore: remove debug console logs from PBS threshold fix 2025-09-10 20:23:29 +00:00
Pulse Monitor 2643f39efe fix: resolve PBS threshold save issues and input focus loss (addresses #440)
- Added 'pbs' type to Override interfaces in both Alerts.tsx and ThresholdsTable.tsx
- Fixed createEffect in Alerts.tsx to properly handle PBS server overrides
- Prevented memos from recomputing during editing to avoid input focus loss
- PBS threshold values now persist correctly when saved
2025-09-10 20:20:38 +00:00
Pulse Monitor 9a37c6622a fix: update dependencies to address GitHub security alerts
- Update Vite to fix middleware file serving vulnerability
- Update golang.org/x/crypto to v0.42.0 for latest security patches
2025-09-10 19:52:00 +00:00
Pulse Monitor a4afd9dc7a fix: show correct default alert delays when no config exists
Don't override the default per-type delays (10, 15, 30, 30) with zeros when the legacy timeThreshold is 0 or undefined.
2025-09-10 19:49:00 +00:00
Pulse Monitor 2dbd9c4e36 feat: implement per-resource-type alert delays
- VMs/Containers default to 10 seconds
- Nodes default to 15 seconds
- Storage defaults to 30 seconds
- PBS servers default to 30 seconds

This allows more appropriate delays for different resource types instead of a single global delay that doesn't fit all use cases. Storage and PBS can have longer delays since they're less critical and more prone to transient spikes during operations.
2025-09-10 19:45:42 +00:00
Pulse Monitor 39e82f26c4 fix: make global default thresholds section always visible (addresses #433)
The collapsible chevron icon was confusing users who didn't realize they needed to expand the section to see the alert delay and threshold settings. Now the global defaults are always visible.
2025-09-10 19:27:47 +00:00
Pulse Monitor 693da82297 fix: restore cross-device theme sync while preserving local persistence (addresses #443)
- localStorage preference has priority for persistence across reloads
- Server preference used only when no local preference exists (first visit)
- WebSocket broadcasts still sync theme changes across devices/tabs
- Maintains the cool real-time sync feature while fixing persistence issue
2025-09-10 18:49:55 +00:00
Pulse Monitor 4b02a76d10 fix: ensure dark mode preference persists across page reloads (addresses #443)
- localStorage preference now takes priority over server settings
- Server no longer overrides local theme choice on page reload
- Theme still syncs to server when toggled for cross-device support
- Fixes issue where dark mode would reset to light after refresh
2025-09-10 18:46:41 +00:00
Pulse Monitor 6c125c23dc fix: remove incorrect 100% threshold disabling logic
The 100% threshold disabling feature was incorrectly implemented and doesn't
make logical sense - metrics can legitimately reach 100% (CPU, memory, storage)
and those are critical conditions that should trigger alerts.

The correct way to disable specific alerts is already implemented:
- Set threshold to 0 or negative to disable a metric type globally
- Use per-resource overrides to disable specific metrics for specific resources
- Example: Overrides[guest-id].Memory = {Trigger: 0} disables memory alerts for that guest

This removes the confusing behavior where 100% thresholds would disable alerts
instead of alerting on actual 100% usage conditions.
2025-09-10 18:38:31 +00:00
Pulse Monitor 8fc1b49d74 fix: dark mode not persisting on page reload (addresses #443)
The dark mode state is now initialized immediately from localStorage when
the app loads, preventing the flash of light mode. Previously, dark mode
was always initialized as false and only set correctly after authentication
checks completed, causing it to briefly show light mode on every reload.

Also removed redundant theme application code throughout the authentication
flow since the theme is now correctly set on initialization.
2025-09-10 17:23:40 +00:00
Pulse Monitor 519119989a fix: storage threshold overrides not being applied (addresses #441, #434)
Two critical issues fixed:
1. Storage threshold overrides were being loaded but never applied - the code
   always used the default threshold instead of checking for overrides
2. Setting a threshold to 100% now properly disables alerts for that metric,
   allowing users to suppress specific alerts they don't want

This fixes both the storage threshold persistence issue and the inability
to disable alerts by setting thresholds to 100%.
2025-09-10 17:20:01 +00:00
Pulse Monitor b270ef7501 fix: improve PBS alert threshold persistence when updating nodes (addresses #440)
The issue was that PBS monitoring uses name-based IDs (pbs-<name>) while
the config system uses index-based IDs (pbs-0, pbs-1). When updating PBS
node configuration, the alert overrides were already being preserved but
the ID mismatch wasn't properly documented. Added explicit logging to
track PBS override preservation using the correct monitoring ID.
2025-09-10 17:11:53 +00:00
Pulse Monitor ceb9939295 fix: ensure cluster endpoints include port number (addresses #428)
When detecting Proxmox cluster nodes, the Host field was being set to just the node name without a port. This caused validation to fail with "invalid Port number" error when qdevices were running.

Now cluster endpoints properly include the port (8006) in the Host field, allowing clusters with qdevices to be added successfully.
2025-09-10 17:01:11 +00:00
Pulse Monitor 6df65a0120 fix: make Physical Disks search field consistent with Storage Pools styling
Updated the Physical Disks search to match the Storage Pools search field:
- Added container with white/gray background and border
- Added search icon on the left
- Matched padding, text size, and focus states
- Ensured consistent dark mode styling
2025-09-10 16:56:27 +00:00
Pulse Monitor 386f283338 fix: remove full-width border line under Storage tabs
Removed the gray border line that extended across the full width under
the Storage Pools/Physical Disks tabs for a cleaner appearance.
2025-09-10 16:54:39 +00:00
Pulse Monitor 99b6814136 fix: remove unnecessary count badge from Physical Disks tab
The badge was inconsistent with Storage Pools tab which doesn't show a count.
The disk count is immediately visible when viewing the tab anyway.
2025-09-10 16:53:23 +00:00
Pulse Monitor 73ca9f7d2e fix: remove development bypass that prevented version info from loading
The App.tsx had leftover debug code that would skip auth entirely and
return early, preventing the version info from ever being fetched.
This caused 'Version: loading...' to appear permanently in the footer.
2025-09-10 16:51:28 +00:00
Pulse Monitor 66908dee61 fix: correct dark mode styling for Physical Disks search field and type badges 2025-09-10 16:48:43 +00:00
Pulse Monitor 311f23cf4e chore: bump version to v4.15.0-rc.3 2025-09-10 16:08:01 +00:00
Pulse Monitor 86ab611961 perf: fix performance issues with large mock datasets (800+ guests)
- Limit alert checking to 50 guests per cycle to prevent blocking
- Remove unnecessary state broadcast when alerts are resolved
- Fix deadlock in GetActiveAlerts by releasing lock quickly
- Enable handling of 800+ mock guests with sub-10ms response times

This allows Pulse to handle large-scale deployments efficiently for testing and production use.
2025-09-10 16:04:35 +00:00
Pulse Monitor 50aac0ee19 fix: prevent duplicate backup entries when same backup appears in multiple storages (addresses #442)
When a backup is accessible from multiple storages (e.g., BACKUP-VM and BACKUP-CT),
it was being displayed twice in the backup list. Added deduplication based on
VMID and timestamp to show each backup only once regardless of how many storages
can access it.
2025-09-10 15:55:58 +00:00
Pulse Monitor 0aeeb3da0d fix: resolve alert acknowledgment timeout issue (addresses #438)
The alert acknowledgment endpoints were hanging because GetState() was called
synchronously to broadcast updates via WebSocket, which could take significant
time with many nodes/guests. This caused the HTTP response to timeout, showing
an error to users even though the alert was successfully acknowledged.

Fixed by:
- Sending HTTP response immediately after acknowledging the alert
- Moving WebSocket broadcast to a goroutine to avoid blocking
- Applied fix to all alert endpoints (acknowledge, unacknowledge, clear, bulk ops)

This resolves the issue where users saw 'Failed to acknowledge alert' errors
but the alert was actually acknowledged (disappeared on refresh).
2025-09-10 15:49:12 +00:00
Pulse Monitor 0eedfac8c1 fix: correct type mismatch in threshold override saving (addresses #441)
The hysteresisThresholds object was incorrectly typed as Record<string, number> when it should contain objects with trigger and clear properties. This caused custom thresholds to not be saved properly, resulting in alerts still firing even when thresholds were increased.

Changed the type from Record<string, number> to Record<string, any> in all three places where threshold overrides are saved in ThresholdsTable.tsx.
2025-09-10 15:16:54 +00:00
Pulse Monitor ce6a76a0f9 fix: preserve PBS alert thresholds when updating node configuration (addresses #440)
When updating PBS nodes through the node configuration UI, alert thresholds
were being reset to defaults. This was because alert overrides are stored
separately from node configuration and weren't being preserved during node updates.

The fix ensures that when a node is updated, the alert configuration (including
any custom threshold overrides) is reloaded and preserved. This applies to both
PBS and PVE nodes to ensure consistent behavior.
2025-09-10 15:12:43 +00:00
Pulse Monitor e731f954b3 fix: resolve PBS API permission errors and missing parameters (addresses #436)
- handle PBS node status endpoint permission errors gracefully (returns nil instead of error for 403s)
- add required cf and timeframe parameters to RRD endpoint calls
- properly handle nil nodeStatus returns in monitor.go

these API calls now fail silently as PBS API tokens often lack the required permissions for these endpoints, which is expected behavior
2025-09-10 14:51:52 +00:00
Pulse Monitor 670bf4665d fix: improve cluster detection reliability on first add (addresses #437)
- Add retry logic with delays to detectPVECluster function to handle API permission propagation
- Periodically re-check standalone nodes to detect if they're actually part of a cluster
- Increase timeout from 3 to 5 seconds for cluster detection attempts
- Skip retries for definitively standalone nodes (501 not implemented errors)

This addresses the issue where adding a PVE cluster doesn't detect it properly on first attempt,
requiring deletion and re-adding to work correctly. The retry mechanism gives time for
API permissions to fully propagate in Proxmox.
2025-09-10 14:39:01 +00:00
Pulse Monitor 13dc131cfc perf: load all guest metadata in single API call (addresses #398)
Instead of making individual API calls for each guest's metadata,
load all metadata once at the Dashboard level and pass it down as props.
This reduces hundreds of HTTP requests to just one when dealing with
large deployments.

With 800 guests, this changes from 800 individual requests to 1 batch request.
2025-09-10 13:30:55 +00:00
Pulse Monitor 6491c2da14 docs: correct alert description to reflect current capabilities (addresses #431)
The README previously claimed alerts for 'VMs go down' but currently only node down detection is implemented. Updated to accurately reflect that alerts are for nodes, not individual VMs/containers.
2025-09-10 13:23:24 +00:00
Pulse Monitor 402334671d fix: prevent QEMU guest agent errors from marking cluster nodes unhealthy (addresses #405)
The cluster client was incorrectly marking nodes as unhealthy when encountering
VM-specific QEMU guest agent errors. This caused storage and backup operations
to fail with "no healthy nodes available" even though the nodes were actually
accessible.

Changes:
- Added broader detection for guest agent errors in executeWithFailover
- Updated recovery logic to ignore VM-specific errors when recovering nodes
- Guest agent errors no longer affect node health status

This fixes the issue where users with clusters would see storage and backup
operations fail after any VM without a guest agent was queried.
2025-09-10 13:19:15 +00:00
Pulse Monitor c668ac9c48 feat: add ~/.pulse marker file for Community Scripts compatibility
- Creates ~/.pulse marker file after successful install/update
- Addresses vhsdream's request in PR #7519
- Helps Community Scripts track that Pulse has been installed
- Improves compatibility between installation methods
2025-09-10 13:09:41 +00:00
Pulse Monitor 8bf06ee683 refactor: remove update command creation to avoid conflicts with Community Scripts
- Native installations no longer create /usr/local/bin/update
- Avoids conflicts with Community Scripts /bin/update command
- Community installations keep their update mechanism
- Native installations use: curl -fsSL ... | bash for updates
- Each installation method respects the other's update approach
2025-09-10 13:03:42 +00:00
Pulse Monitor 25ed6172a0 refactor: improve service name detection compatibility (addresses #430)
- Use centralized detectServiceName() function instead of duplicate logic
- Automatically detect whether system uses 'pulse' or 'pulse-backend' service
- Improves compatibility between official and community installer scripts
- Reduces confusion when users mix installation methods
2025-09-10 12:33:20 +00:00
Pulse Monitor 80e3ee311b fix: make physical disk progress bars consistent with rest of UI 2025-09-10 10:33:52 +00:00
Pulse Monitor 6f840834f1 feat: improve memory reporting accuracy using available memory (addresses #435)
- Calculate memory as (Total - Available) instead of raw Used value
- Excludes buffer/cache memory that Linux can reclaim when needed
- Prevents false alerts from Linux cache usage
- Falls back to traditional calculation on older Proxmox versions
- VMs already use FreeMem from guest agent when available
- Memory usage will appear lower but more accurate (e.g., 56% instead of 84%)
- Users may need to adjust alert thresholds accordingly
2025-09-10 10:17:07 +00:00
Pulse Monitor 8fbe53406a feat: improve memory reporting by using available memory instead of free (addresses #435)
- Add Available field to MemoryStatus struct to capture memory available for allocation
- Update node memory calculation to use Available memory when present
- This excludes non-reclaimable cache/buffers from used memory calculation
- Provides more accurate memory pressure indication, avoiding false alerts
- Falls back to traditional used memory if Available field is missing (older Proxmox versions)
2025-09-09 21:35:09 +00:00
Pulse Monitor 4f45238f9c Revert "fix: properly handle 100% thresholds to disable alerts (addresses #434)"
This reverts commit ffb744d711.
2025-09-09 21:27:29 +00:00