Commit Graph

339 Commits

Author SHA1 Message Date
Pulse Monitor effa640fda 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 96fa8e839a 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 762277e361 chore: bump version to v4.12.1 2025-08-31 21:29:25 +00:00
Pulse Monitor 6966cc3d3b 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 634e0dd372 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 1899e28e3a chore: bump version to v4.12.0 2025-08-31 18:13:10 +00:00
Pulse Monitor 248394d77e 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 520b85c49c 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 12fbc12639 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 50c2506d9e 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 532cde005e 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 71bc34504a 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
Pulse Monitor aadb43cf0c fix: improve node connection status tracking (addresses #385)
- nodes now properly show as disconnected when client creation fails
- all configured nodes are checked, not just ones with active clients
- connection health is tracked from the actual monitoring state
- added detailed logging when client creation fails to help diagnose issues
- storage and backup tabs should now properly reflect connection status

previously, if a node failed to create a client during initialization (due to auth issues, network problems, etc), it wouldn't be tracked at all, causing inconsistent UI state. now all configured nodes are properly tracked and their connection status is accurately reflected.
2025-08-31 15:26:32 +00:00
Pulse Monitor 900f8bb432 fix: improve VM disk usage detection from guest agent (addresses #367)
- Always attempt to get filesystem info from guest agent when cluster/resources or node APIs return 0 disk usage
- The Proxmox API often returns 0 for disk field even when guest agent has real data available
- More aggressively query guest agent for running VMs with 0 disk usage
- Improved logging to show when disk data is successfully retrieved from guest agent
2025-08-31 15:12:15 +00:00
Pulse Monitor e6253cfa3d fix: enable alert checking for mock mode data (addresses #399)
Mock mode was bypassing alert checking entirely, causing alerts not to trigger even when thresholds were exceeded. Added checkMockAlerts() function that processes mock VMs, containers, nodes and storage through the alert manager.
2025-08-31 15:03:09 +00:00
Pulse Monitor ad98491bf4 fix: add missing base64 import for password change handler 2025-08-31 08:50:48 +00:00
Pulse Monitor 52d91855ae chore: bump version to v4.11.0 2025-08-31 08:49:32 +00:00
Pulse Monitor 617b912d07 fix: prevent false positive alerts for powered-off VMs (addresses #397)
Fixed an issue where powered-off VMs were triggering CPU/RAM alerts.
Changes made:

1. Alert manager now skips ANY non-running VM (not just "stopped")
   - Handles all states: stopped, paused, suspended, etc.
   - Only checks thresholds for VMs with status="running"

2. Zero out metrics for non-running VMs/containers
   - Proxmox may report stale metrics for stopped VMs
   - Now explicitly sets CPU, memory, disk, network to 0 for non-running guests

3. Added debug logging to track VM states and metric handling

This ensures alerts only fire for actively running VMs and containers.
2025-08-31 08:44:18 +00:00
Pulse Monitor 401839620c improve: handle storage timeout errors more gracefully (addresses #389)
Storage operations on slow nodes were timing out after 30 seconds.
Made several improvements to handle this better:

- Increased default CONNECTION_TIMEOUT from 30s to 45s
- Added retry logic for storage queries that timeout
- Changed error logs to warnings for recoverable storage issues
- Storage polling now continues with other nodes if one fails

Users experiencing timeouts can also set CONNECTION_TIMEOUT env variable
to a higher value (e.g., CONNECTION_TIMEOUT=60s) if needed.
2025-08-31 08:40:22 +00:00
Pulse Monitor 2004042c27 fix: password change functionality now properly validates current password (addresses #396)
The change password feature was not working because the backend wasn't
actually verifying the current password before allowing changes. Fixed both
frontend and backend issues:

- Frontend now uses the correct username from localStorage
- Backend now properly validates the current password before allowing change
- Added proper security checks to prevent unauthorized password changes
2025-08-31 08:36:00 +00:00
Pulse Monitor bb505238c7 improve: enhance storage polling robustness and logging (addresses #385)
Storage polling now continues even if cluster-level storage config fails,
falling back to node-level storage data. Added comprehensive logging to
help diagnose storage/backup visibility issues.

Changes:
- Continue storage polling when cluster storage API fails
- Add detailed debug logging for storage operations
- Downgrade error to warning when API calls fail but can recover
- Better visibility into storage polling process
2025-08-31 08:31:31 +00:00
Pulse Monitor cf03e6f742 fix: broadcast state updates after alert acknowledgment (addresses #380)
- Add WebSocket hub reference to AlertHandlers
- Broadcast state after acknowledge, clear, and bulk operations
- Ensures UI acknowledgment counts update immediately without refresh
- Fixes issue where acknowledgment would disappear after 2 seconds
2025-08-31 06:58:10 +00:00
Pulse Monitor 120ae2bcbe fix: detect HTTPS protocol when behind reverse proxy for setup scripts
addresses #394 - setup script now correctly uses https:// in generated commands
when Pulse is running behind an HTTPS reverse proxy like Traefik by checking
the X-Forwarded-Proto header
2025-08-30 22:48:53 +00:00
Pulse Monitor 1156414f70 fix: enforce admin privileges for proxy auth users on write operations
addresses GHSA-wmgw-3g78-89xf - proxy authenticated non-admin users now properly receive 403 Forbidden when attempting write operations

- Added RequireAdmin middleware to check proxy auth admin role
- Applied admin checks to node add/update/delete operations
- Applied admin checks to system settings updates
- Applied admin checks to export/import operations
- Applied admin checks to API token regeneration
- Applied admin checks to password changes
- Non-admin proxy auth users now have proper read-only access as documented
2025-08-30 22:30:59 +00:00
Pulse Monitor dc88ab56b4 chore: bump version to v4.10.2 2025-08-30 12:39:41 +00:00
Pulse Monitor 1393726cbe fix: add offline node checks to prevent 595 auth errors (addresses #379)
- Added offline node status checks before attempting to access node resources
- Fixed pollStorageWithNodes to skip offline nodes
- Fixed GetNodeStatus calls to skip offline nodes
- Fixed storage metric collection to skip offline nodes
- Added test offline node (pve3) to mock data generator

This prevents the 595 "authentication failed" errors that occur when
trying to access resources on offline cluster nodes through other nodes.
2025-08-30 12:36:29 +00:00
Pulse Monitor 0a86333374 feat: improve screenshots and mobile UI responsiveness
- Update screenshot tool to use MacBook Air resolution (2560x1600)
- Remove empty side borders from screenshots
- Use mock data for all screenshots for privacy
- Fix mobile alert buttons overflowing viewport
- Exempt localhost from API rate limiting for better dev experience
- Update documentation to showcase all features with screenshots
- Reorganize README visual tour into feature sections
2025-08-30 12:25:53 +00:00
Pulse Monitor 38e49f77ac fix: improve handling of offline nodes and 595 errors
addresses #379 - better handling of offline nodes in clusters
- Skip polling VMs/containers from offline nodes to avoid 595 errors
- Improved error message for 595 to distinguish between auth failures and offline node access

addresses #389 - improved error messaging
- Better detection of whether 595 is an auth issue or offline node issue
- Clearer error messages to help users diagnose the actual problem

The 595 error can occur when:
1. Authentication actually fails (wrong credentials)
2. Trying to access resources on an offline node through another node in the cluster
2025-08-30 11:27:35 +00:00
Pulse Monitor c57c296cba fix: address LXC container parsing and timeout issues
addresses #388 - LXC containers not showing due to VMID type mismatch
- Changed Container.VMID from int to FlexInt to handle string VMIDs from older Proxmox versions
- Updated all code that references Container.VMID to cast to int where needed

addresses #389 - connection timeout errors with Proxmox nodes
- Increased default CONNECTION_TIMEOUT from 10s to 30s to handle slower networks
- This should resolve "context deadline exceeded" errors when polling nodes

addresses #379 - authentication errors may have been related to timeouts
2025-08-30 11:21:58 +00:00
Pulse Monitor be8392fad3 feat: improve documentation with high-quality screenshots and mock alert history
- Add high-quality screenshots with 3x device scale factor for crisp text
- Implement mock alert history generator spanning 90 days
- Update documentation with detailed screenshot descriptions
- Add visual tour section to README with key screenshots
- Fix mock mode to properly separate from production data
- Clean up screenshot script to use actual mock data instead of DOM injection
- Enhance FAQ and webhooks docs with relevant screenshots
2025-08-30 11:13:41 +00:00
Pulse Monitor 43d6e7acf5 chore: bump version to v4.10.1 2025-08-29 23:11:12 +00:00
Pulse Monitor fb3af99077 improve: add version data to mock nodes and clean up storage display
- Add PVE and kernel version data to mock node generation
- Remove redundant total storage stats from node header rows in storage tab
- Simplify storage table layout by spanning node name across full row
2025-08-29 22:43:25 +00:00
Pulse Monitor 15cf4672b2 fix: restore backup table columns and fix PBS storage node display
- restored Node, Owner, and Location columns to backups table
- fixed issue where PBS backups via Proxmox storage showed storage name in Node column
- now correctly shows actual Proxmox node in Node column for all backup types
- Location column shows storage/datastore name without duplication
2025-08-29 21:41:15 +00:00
Pulse Monitor 6f70ed4188 improve backups table: remove redundant columns, reorder for better flow
- removed redundant Node column (info now in Location column)
- removed Owner column (was showing all dashes)
- reordered columns: VMID, Type, Name, Time, Size, Backup, Location, Verified, Details
- combined node:storage in Location column for clarity
2025-08-29 21:23:33 +00:00
Pulse Monitor 9e5b031230 fix: only apply dev IP workaround when .dev-mode file exists 2025-08-29 16:41:18 +00:00
Pulse Monitor baa733d06f fix: hardcode dev IP for setup script URLs when proxied through vite 2025-08-29 16:34:16 +00:00
Pulse Monitor 891af0e573 fix: remove conflicting stub file 2025-08-29 16:19:13 +00:00
Pulse Monitor 7641bbf57f feat: include mock package for Docker builds 2025-08-29 16:18:24 +00:00
Pulse Monitor 72f2feeb22 Revert "fix: remove mock import from production build"
This reverts commit e927a39416.
2025-08-29 16:17:28 +00:00
Pulse Monitor e927a39416 fix: remove mock import from production build 2025-08-29 16:17:21 +00:00
Pulse Monitor af72916a37 chore: bump version to v4.10.0 2025-08-29 16:11:09 +00:00
Pulse Monitor 18d1786643 chore: consolidate development environment and fix multiple issues
- Fixed alert acknowledgment persistence bug in monitor.go
- Reordered columns in NodeSummaryTable for better logical grouping
- Consolidated development environment with improved hot-dev script
- Updated vite.config.dev.ts for consistent port usage (7656)
- Enhanced Go main.go with better development mode detection
- Removed obsolete development scripts for cleaner repository
- Added comprehensive development documentation in CLAUDE.md

Development improvements ensure consistent port 7655 usage and
eliminate conflicts between different development approaches.
2025-08-29 13:49:45 +00:00
Pulse Monitor c67d6d960d fix: alert acknowledgment not persisting - map update was missing
The AcknowledgeAlert function was modifying the alert pointer but not writing
it back to the activeAlerts map. Since Go maps store values (not references),
the acknowledged state wasn't being persisted. Fixed by adding the map update
after modifying the alert properties.
2025-08-29 12:47:15 +00:00
Pulse Monitor 96e0aacfff fix: remove mock code from production builds to fix Docker compilation 2025-08-29 11:57:40 +00:00
Pulse Monitor 7c57099760 chore: bump version to v4.10.0-rc.2 2025-08-29 11:50:16 +00:00
Pulse Monitor bbf499cd10 fix: address Discord webhook issues from #378
- Remove invalid url field from Discord embed (was causing 400 error)
- Remove SVG avatar/footer icons (Discord doesn't support SVG)
- Fix test webhook to use proper instance URL instead of 'pulse-monitoring'
- Discord webhook template now sends valid payloads
2025-08-29 11:15:35 +00:00
Pulse Monitor e6c15f620a feat: add version column to node tables
- Shows PVE/PBS version in node summary tables
- Helps quickly identify nodes needing updates
- Extracts just version number from PVE (e.g. 9.0.5)
- Also improved mock mode system for local development
2025-08-29 10:58:23 +00:00
Pulse Monitor b5de59400d chore: bump version to v4.10.0-rc.1 2025-08-28 17:41:26 +00:00
Pulse Monitor 754ccee715 fix: address intermittent configuration display issue (#372)
- Increased rate limits for configuration GET endpoints to prevent 429 errors
- Added automatic retry logic for rate-limited requests with exponential backoff
- Added small delays between initial API calls to prevent burst requests
- Configuration read endpoints now use PublicEndpoints limit (1000/min vs 500/min)

This should resolve the issue where the configuration page sometimes shows
no information and prompts for system setup even when it's already configured.
2025-08-28 17:32:29 +00:00
Pulse Monitor 2b79ae8648 feat: improve dashboard UI with tags and better filtering
- Add clickable tag badges with Proxmox-style coloring for VM/container tags
- Implement grouping toggle to switch between node-grouped and flat list views
- Replace alert dot indicators with left border highlighting to avoid visual conflicts
- Add tag filtering support in search (tags:tagname)
- Fix alert visualization on storage page to use left borders
- Improve search functionality with uptime metric support
- Remove info tooltip from search field, add clear button instead
- Update placeholder text to be more helpful

addresses #370, addresses #371
2025-08-28 17:26:57 +00:00