Commit Graph

928 Commits

Author SHA1 Message Date
Pulse Monitor f3af1f7efa refactor: redesign disk list as compact table to match Pulse's condensed data style 2025-09-08 21:45:33 +00:00
Pulse Monitor 8a6e3755a6 fix: replace emoji indicators with proper status badges in disk monitoring UI 2025-09-08 21:38:14 +00:00
Pulse Monitor 55cde3edc3 fix: add missing physicalDisks handler to WebSocket store (addresses #429)
The disk monitoring backend was working but frontend wasn't updating because the WebSocket store was missing the handler for physicalDisks data. Also added physicalDisks count to broadcast logging for better debugging.
2025-09-08 20:17:10 +00:00
Pulse Monitor 6289a0b5e9 feat: add mock disk data generation for testing UI 2025-09-08 20:15:49 +00:00
Pulse Monitor 76cc140b39 fix: add physicalDisks to WebSocket store initial state 2025-09-08 20:06:34 +00:00
Pulse Monitor f5334fc413 feat: enhance disk monitoring UI with dashboard widget and node badges (addresses #429)
- Added DiskHealthSummary widget to dashboard showing:
  - Total disk health status overview
  - Healthy/failing/low-life disk counts
  - Average SSD life remaining with visual bar
  - Distribution of disks across nodes
- Added disk count badges to node selector in storage tab
- Shows disk counts next to storage pools count per node
- Webhook notifications automatically trigger for disk alerts via existing system
- Dashboard widget highlights issues with color-coded status indicators
2025-09-08 16:59:01 +00:00
Pulse Monitor cb08dd85d4 feat: implement S.M.A.R.T. disk monitoring for Proxmox nodes (addresses #429)
- Added disk polling to monitoring cycle using Proxmox API
- Created CheckDiskHealth() alert manager for failing drives and low SSD life
- Added PhysicalDisk model to state with proper serialization
- Implemented DiskList component with health indicators and SSD wearout bars
- Added Physical Disks tab to Storage page with toggle between pools and disks
- Added ZFS health badges to storage cards for degraded/failed pools
- Alerts trigger for health != PASSED and SSD wearout < 10%
- Frontend displays disk model, type, temperature, and usage information
2025-09-08 16:40:05 +00:00
Pulse Monitor 820ee6499d fix: improve cluster detection to handle qdevice configurations (addresses #428)
- Add API validation for cluster nodes to filter out qdevice VMs
- Only include nodes with working Proxmox APIs in cluster endpoints
- Prevent connection failures when cluster has non-Proxmox participants
- Add detailed logging for cluster node validation process

This resolves issues where Proxmox clusters using corosync qdevice
(external quorum device) would fail to connect because Pulse tried
to connect to the qdevice VM which has no Proxmox API.
2025-09-07 21:19:30 +00:00
Pulse Monitor 95987141b9 fix: improve guest URL validation and error handling (addresses #427)
- Add client-side URL validation with instant feedback
- Show validation errors inline below URL input fields
- Prevent saving when URLs have validation errors
- Improve error message extraction in API client
- Handle incomplete URLs like 'https://emby.' gracefully
- Backend already had validation, now frontend shows it properly
2025-09-07 14:27:03 +00:00
Pulse Monitor eab4c07986 fix: improve error handling for guest URL saving (addresses #427)
- Add more specific error messages when metadata save fails
- Better handling of permission and disk space errors
- This should help diagnose why guest URLs fail to save in some cases
- The atomic write operation was already in place but errors weren't clear
2025-09-07 14:05:22 +00:00
Pulse Monitor 00338fb8f6 fix: completely bypass auth for development environment
- Skip auth check entirely in App.tsx for development
- Add .env.dev file with DISABLE_AUTH=true and PULSE_MOCK_MODE=true
- Update hot-dev.sh to load .env.dev environment variables
- This ensures the app loads immediately without auth issues
- WebSocket and API now work without authentication in dev mode
2025-09-07 13:49:17 +00:00
Pulse Monitor b3fb480ffb fix: resolve app loading issue by bypassing auth check hang
- Changed initial isLoading state to false to prevent infinite loading
- Initialize WebSocket store immediately on component mount
- Added error handling and debug logging to identify issues
- Added 10-second timeout fallback for auth checks
- The auth check was hanging, preventing the app from ever loading
2025-09-07 12:45:49 +00:00
Pulse Monitor b571f03269 fix: resolve TypeScript errors in ResourceTable component
- Fixed Resource interface to properly define all used properties
- Added proper optional chaining for potentially undefined values
- Fixed displayValue to always return a number type
- Properly handle undefined thresholds and defaults in event handlers
- Fixed input value handling to work with strict TypeScript checks
2025-09-07 07:52:51 +00:00
Pulse Monitor e0260cb0d1 fix: resolve PBS alert toggle and offline alert issues (addresses #426)
- Fixed PBS alert toggle not responding in thresholds settings
- PBS servers now use connectivity toggle like nodes instead of disabled toggle
- Added support for disableConnectivity flag on PBS instances in backend
- Fixed PBS ID format mismatch between frontend and backend
- PBS offline alerts now properly respect the disableConnectivity setting
- Prevents spam alerts by checking disableConnectivity flag for PBS offline alerts
2025-09-07 07:13:56 +00:00
Pulse Monitor e4e4f515c7 fix: resolve VM disk monitoring issues (addresses #414, #416, #425)
- Always query guest agent for running VMs instead of only when disk is 0
- Add duplicate mount point detection to prevent inflated disk totals
- Show allocated disk size as fallback when guest agent unavailable
- Add comprehensive logging for guest agent disk queries
- Include diagnostic script for troubleshooting VM disk issues
2025-09-06 19:59:25 +00:00
Pulse Monitor 3abd6c43ba chore: bump version to v4.15.0-rc.2 2025-09-06 19:52:56 +00:00
Pulse Monitor 5325ef481e fix: comprehensive VM disk usage reporting improvements (addresses #414, #416, #348, #367, #425)
- Always query guest agent for running VMs (cluster/resources API always returns 0)
- Show allocated disk size when guest agent unavailable (instead of misleading 0%)
- Fix duplicate mount point counting issue (#425)
- Add comprehensive logging for guest agent queries
- Include diagnostic script for troubleshooting VM disk issues
- Update both monitor.go and monitor_optimized.go for consistency
2025-09-06 19:52:11 +00:00
Pulse Monitor 11541a1f6d fix: resolve TypeScript type comparison errors in backup VMID handling 2025-09-06 12:42:16 +00:00
Pulse Monitor bb9bb9371f chore: bump version to v4.15.0-rc.1 2025-09-06 12:39:26 +00:00
Pulse Monitor dda66c4cd3 security: fix path traversal and malformed token handling vulnerabilities
- Prevent path traversal attacks by cleaning and validating URL paths
- Use secure token comparison to prevent timing attacks
- Return appropriate HTTP status codes for different attack vectors
- Add comprehensive logging for security events
2025-09-06 12:38:46 +00:00
Pulse Monitor 961d9c81e3 fix: restore guest agent disk stats in optimized monitor (addresses #414)
The parallel optimization introduced in commit 634e0dd37 accidentally removed
all guest agent filesystem fetching logic from the optimized monitor code.
This caused VMs with guest agents to show no disk stats after v4.12.1.

Added back the guest agent fetching logic to pollVMsWithNodesOptimized:
- Fetches filesystem info when VM disk stats are 0
- Aggregates disk usage from all valid filesystems
- Skips special filesystems and Windows System Reserved partitions
- Uses guest agent data when available to show accurate disk usage

This restores disk stats display for VMs with working QEMU guest agents.
2025-09-06 11:17:04 +00:00
Pulse Monitor 5615662d9e feat: complete ZFS pool monitoring implementation (addresses #423)
- Implement proper API integration with list and detail endpoints
- Add ZFS pool and device status conversion
- Enable by default with PULSE_DISABLE_ZFS_MONITORING opt-out
- Test with real Proxmox nodes and verify functionality
- Add comprehensive error handling and logging
- Document feature configuration and requirements

The feature now properly:
- Fetches ZFS pool status from Proxmox API
- Detects degraded/faulted pools and devices
- Tracks read/write/checksum errors
- Generates appropriate alerts
- Displays issues in the Storage tab UI

Tested and verified working with real Proxmox clusters.
2025-09-06 10:56:17 +00:00
Pulse Monitor 9582afc0b1 fix: comprehensive PMG backup detection with debug mode (addresses #359)
- Added debug mode: localStorage.setItem('debug-pmg', 'true')
- Robust VMID=0 detection handles string and number types
- Debug logging shows exactly what's happening with PMG backups
- Created test suite that verifies all PMG backup scenarios
- All test cases pass including PBS 'ct' type with VMID='0'

Users experiencing issues can enable debug mode to help diagnose:
1. Open browser console
2. Run: localStorage.setItem('debug-pmg', 'true')
3. Reload page and check for [PMG Debug] messages
4. Share debug output if still showing as LXC

Test results:
✓ PBS PMG backup (ct type with VMID 0) → Host
✓ PBS PMG backup (ct type with numeric VMID 0) → Host
✓ Storage PMG backup (host type) → Host
✓ Storage PMG backup (lxc type with VMID 0) → Host
✓ Regular LXC backup → LXC
2025-09-06 10:49:20 +00:00
Pulse Monitor 70ee42468b fix: make PMG backup detection more robust for VMID=0 (addresses #359)
- Handle VMID as both string and number types consistently
- Check for both 'ct' and 'lxc' backup types (PBS uses 'ct')
- Check for both 'vm' and 'qemu' backup types for consistency
- Always check VMID=0 first before checking backup type
- PBS stores PMG backups as 'ct' type with VMID='0' (string)

This should properly identify all PMG host config backups regardless
of whether they come from PBS or regular storage, and regardless
of whether VMID is a string or number.
2025-09-06 10:44:01 +00:00
Pulse Monitor 8de7ca69ec debug: add logging to diagnose PMG backup detection issue #359
Added console.log statements to understand why PMG backups with VMID=0
are still showing as LXC in v4.14.0. This will help identify:
- What data type vmid is (string vs number)
- What backup type is being sent
- Whether the checks are being triggered
2025-09-06 10:43:28 +00:00
Pulse Monitor a7647acc34 fix: make ZFS monitoring experimental and opt-in
- Add PULSE_ENABLE_ZFS_MONITORING env var (disabled by default)
- Fix API field mapping (health vs state, cksum vs checksum)
- Add proper API endpoint structures for list and detail
- Mark feature as experimental due to API complexity
- Simplify conversion to handle basic health status only

This is a safer approach until we can fully test with real Proxmox nodes
2025-09-06 10:41:49 +00:00
Pulse Monitor c58be6878e feat: add ZFS pool status monitoring (addresses #423)
- Add ZFS pool status data structures to models
- Implement ZFS pool data collection via Proxmox API
- Add ZFS pool health alerts for degraded/faulted states
- Add ZFS device error detection and alerting
- Display ZFS pool status in Storage tab when issues detected
- Add mock data generation for testing ZFS monitoring
- Alert on read/write/checksum errors for pools and devices
2025-09-06 10:35:53 +00:00
Pulse Monitor 160a6eb957 fix: properly identify PMG host config backups (VMID=0) as Host type (addresses #359) 2025-09-06 10:35:02 +00:00
Pulse Monitor 776fec7018 fix: properly handle PBS connection timeouts with granular timeout settings
The real issue was not the overall timeout duration, but that DNS resolution and TLS handshake could hang indefinitely. Added specific timeouts for:
- DNS resolution/connection: 10 seconds
- TLS handshake: 10 seconds
- Response headers: 10 seconds

This prevents the connection from hanging on DNS lookup (like with pve-backup.lan) or during TLS negotiation, which was causing the 'context deadline exceeded' errors. (addresses #424)
2025-09-06 10:07:10 +00:00
Pulse Monitor f7b8b0dc7f fix: increase PBS timeout to prevent 'context deadline exceeded' errors (addresses #424)
PBS servers can be slow to respond, especially under load or over slower connections. Increased the timeout from 10 seconds to 30 seconds specifically for PBS version checks during diagnostics.
2025-09-06 10:03:55 +00:00
Pulse Monitor 9bc2491e3d fix: improve cluster health checks and handle VMFileSystem unmarshal errors (addresses #405)
- Made cluster health checks less aggressive to prevent false unhealthy states
- Fixed JSON unmarshal error when Proxmox returns object instead of array for VMFileSystem
- Increased initial health check timeouts from 2s to 5s for better reliability
- Added handling for JSON unmarshal errors as data format issues, not connectivity problems
- Improved recovery check interval from 5s to 10s to reduce excessive health checks
- Changed log levels from WARN to DEBUG for transient connectivity issues
2025-09-05 22:29:29 +00:00
Pulse Monitor c5e426e2a5 chore: bump version to v4.14.0 2025-09-05 18:23:13 +00:00
Pulse Monitor b6eea3c700 improve: handle unavailable storage more gracefully (addresses #418)
- Reduced storage API timeout from 120s to 15s to prevent blocking when storage mounts are unavailable
- Added graceful error handling for storage timeouts - continues with partial data instead of failing
- Improved error messages to clarify when timeouts are likely due to unavailable storage (e.g., NFS mounts)

This prevents Pulse from marking nodes as unhealthy when storage endpoints timeout due to temporarily unavailable network storage.
2025-09-05 17:41:30 +00:00
Pulse Monitor d84fe5971a fix: handle fresh PVE installations without VMs in installer (addresses #422)
The installer would exit abruptly on fresh Proxmox installations without any VMs due to commands failing with set -e enabled. Now wrapped the ID collection section with set +e/set -e to allow graceful handling of these cases.
2025-09-05 17:33:36 +00:00
Pulse Monitor 5ee1727bb6 fix: improve cluster connectivity handling when endpoints are not resolvable (addresses #420)
- Use main host for cluster operations when node endpoints lack FQDNs/IPs
- Skip initial health check for single-endpoint clusters (main host routing)
- Return empty lists instead of errors when cluster nodes are unreachable
- Prevent VMs/containers from disappearing when cluster has connectivity issues
- Fix the 'Instance marked as cluster but is actually standalone' false warning
2025-09-05 16:03:56 +00:00
Pulse Monitor 70d88a3b0d chore: bump version to v4.14.0-rc.2 2025-09-04 20:46:32 +00:00
Pulse Monitor 2eb7589747 fix: prevent rate limiting on essential real-time endpoints (addresses #419)
The /api/state and /api/guests/metadata endpoints are now excluded from
rate limiting as they are polled frequently by the UI for real-time updates.
This prevents the "Loading..." issue when users with multiple nodes access
the application.

- Added skip list in UniversalRateLimitMiddleware for real-time endpoints
- Removed duplicate rate limiting logic from router's ServeHTTP
- Consolidated all rate limiting into the universal middleware
2025-09-04 20:22:56 +00:00
Pulse Monitor d031d1e35a fix: use Index instead of For loop for webhook header inputs (addresses #412)
Switched from For to Index loop which provides better stability for input elements in SolidJS. Also removed circular dependency between headerInputs and formData that was causing re-renders.
2025-09-04 20:09:38 +00:00
Pulse Monitor a097f2fe22 fix: webhook header inputs losing focus after each keystroke (addresses #412)
Refactored header management to use a separate array with stable IDs instead of iterating over object entries. This prevents React/SolidJS from losing track of which input has focus when the headers object changes.
2025-09-04 19:58:32 +00:00
Pulse Monitor ca59fcd8d9 fix: webhook header input losing focus when typing (addresses #412)
The header key input was losing focus after each keystroke due to improper state updates that caused unnecessary re-renders. Fixed by preserving the header object order and avoiding the use of array indices.
2025-09-04 19:50:49 +00:00
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 397503558f fix: prevent VM-specific errors from marking cluster nodes unhealthy (addresses #405)
- Fixed issue where QEMU guest agent errors incorrectly marked nodes as unhealthy
- Nodes with VMs missing guest agents no longer affect cluster health status
- Reduced health check retry interval from 30s to 5s for faster recovery
- Storage and backup polling now works correctly even when some VMs lack guest agents
2025-09-04 19:34:11 +00:00
Pulse Monitor 7f30441a82 fix: close webhook form after successfully adding a webhook
- Form now properly closes after clicking 'Add Webhook'
- Prevents confusing UX where form stays open after saving
- User can click '+ Add Webhook' again if they want to add another
2025-09-04 19:10:42 +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 5ce863df97 feat: add test button to webhook creation form
- Users can now test webhook configurations before saving them
- Test button appears in the add/edit form when URL and name are provided
- Shows 'Testing...' feedback during test execution
- Helps users validate webhook settings immediately during setup
- Improves UX by catching configuration issues before saving
2025-09-04 18:33:28 +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