Commit Graph

408 Commits

Author SHA1 Message Date
Pulse Monitor 2f8b176d80 fix: apply PBS instance filter to backup frequency chart 2025-08-18 17:35:07 +00:00
Pulse Monitor 8dd724414e feat: add node card selection with content filtering
- Make PVE node cards and PBS cards selectable in Dashboard and Backups tabs
- Auto-filter to 'remote' backups when PBS instance selected
- Filter backups by selected PBS instance name
- Disable backup type filter buttons when PBS selected
- Visual feedback with blue ring on selected cards
2025-08-18 17:32:36 +00:00
Pulse Monitor 681d91daf9 fix: PBS node stats now work correctly
- Fixed PBS API endpoint to use /nodes/localhost/status directly
- PBS always uses 'localhost' as the node name, not dynamic discovery
- Updated PBSCard to properly detect Docker instances by name
- Improved display for PBS instances without Sys.Audit permission
- PBS instances now correctly show CPU, memory, and uptime when available
2025-08-18 16:36:10 +00:00
Pulse Monitor 2c54a8131d fix: show red indicator for offline nodes instead of grey
addresses #331 - offline PVE/PBS nodes now display red status dots
instead of grey ones for better visual clarity
2025-08-18 15:49:43 +00:00
Pulse Monitor a064f2f006 feat: add HTTPS/TLS support via environment variables
- Add HTTPS_ENABLED, TLS_CERT_FILE, TLS_KEY_FILE environment variables
- Server automatically starts in HTTPS mode when configured
- Falls back to HTTP with warning if certs missing
- WebSocket origins automatically adjust for HTTPS
- Fully backward compatible - defaults to HTTP
- Documented in README and CONFIGURATION.md

Addresses kenrmayfield's request for HTTPS support
2025-08-18 15:29:37 +00:00
Pulse Monitor 78fab8bb8f feat: add PBS system stats display (addresses #259)
- Grant enhanced Audit permissions to PBS tokens for system stats access
- Create PBSCard component to display CPU, memory, disk, uptime metrics
- Detect Docker PBS instances and show appropriate info without stats
- Add adaptive node layout on dashboard for better scalability
- Move PBS status card to Backups tab above frequency chart
- Create CompactNodeCard for handling many nodes efficiently
- Update PBS setup script to grant Audit role to both user and token

This addresses the request in issue #259 to show PBS system stats on the dashboard.
The implementation uses read-only Audit permissions to access the /nodes endpoint
while maintaining security. Docker PBS instances are detected and handled gracefully
since they cannot provide host system statistics.
2025-08-18 15:08:04 +00:00
Pulse Monitor 11dccd84f9 refactor: use centralized apiFetch for consistent authentication handling
Replace direct fetch() calls with apiFetch() utility which:
- Automatically includes credentials for session cookies
- Adds proper headers to prevent browser auth popups
- Handles CSRF tokens and authentication consistently
- Provides retry logic for CSRF token failures
2025-08-18 13:02:16 +00:00
Pulse Monitor 8b7a926911 fix: maintain bin/ directory structure in universal tarball (addresses #330)
The universal tarball (pulse-vX.X.X.tar.gz) now places binaries in bin/ subdirectory
to match the structure of architecture-specific tarballs. This fixes manual extraction
issues while maintaining compatibility with all installation methods.
2025-08-18 13:01:26 +00:00
Pulse Monitor 32d1007284 fix: ensure pulse user is created during updates
- Add create_user() call to update flow (option 1)
- Add create_user() call to reinstall flow (option 2)
- Fixes 'chown: invalid user: pulse:pulse' error on older installations
- Ensures smooth migration from root/other users to pulse user
2025-08-18 10:19:52 +00:00
Pulse Monitor 0a8b54ac99 chore: bump version to v4.4.1-rc.1 2025-08-18 09:58:29 +00:00
Pulse Monitor 496f0ee3a5 fix: prevent syslog spam on standalone Proxmox nodes
- Only check cluster status during initial configuration, not during polling
- Cache cluster membership in config to avoid repeated API calls
- Skip cluster/resources endpoint entirely for standalone nodes
- Change cluster detection failure from WARN to DEBUG (expected for standalone)

This addresses #322 where standalone PVE nodes were causing certificate
lookup errors in syslog every minute during polling.
2025-08-18 09:43:04 +00:00
Pulse Monitor 9f0b7e8cba fix: correctly place Backup & Restore section in System tab
- Previously placed in Diagnostics tab by mistake
- Now properly positioned in System tab after Updates section
- Maintains all existing functionality
2025-08-18 09:10:29 +00:00
Pulse Monitor cbb0e2c334 move Backup & Restore section from Security to System tab
- Relocated backup/restore functionality to System tab for better UX
- Updated text from 'Security Notice' to 'Important Notes'
- Maintains all existing functionality
2025-08-18 08:49:08 +00:00
Pulse Monitor 9b71d27208 remove 12 character minimum requirement for export passphrase
Users can choose their own passphrase length without being forced to use 12+ characters
2025-08-18 08:39:39 +00:00
Pulse Monitor fd30914e48 fix: persist dark mode preference from setup to login screen
Fixed localStorage key mismatch - setup was saving to 'dark-mode' while login was looking for 'darkMode'
2025-08-18 08:35:27 +00:00
Pulse Monitor 6ff144f445 fix: add confirmation requirement for node connectivity alerts
Requires 3 consecutive offline polls (~15 seconds) before triggering connectivity alerts to prevent false positives from transient cluster communication issues
2025-08-18 07:57:58 +00:00
Pulse Monitor 9969c53101 fix: add missing Type field when creating VMs/containers from cluster resources
addresses #329 - VMs were being displayed as LXC containers because the Type field wasn't being set when using the efficient cluster/resources polling method
2025-08-18 07:46:35 +00:00
Pulse Monitor d7ddaff735 fix: preserve alert threshold edit state during WebSocket updates (#295)
The edit state was being lost when WebSocket updates triggered component
re-renders every 5 seconds. Fixed by:
1. Only resetting edit values when editing starts, not on every update
2. Checking if overrides actually changed before updating state
3. Preserving the editing state across WebSocket data refreshes
2025-08-18 07:35:44 +00:00
Pulse Monitor 67b9f67ad0 fix: prevent cluster/resources calls on non-clustered nodes
Non-clustered Proxmox nodes were getting certificate verification errors
when Pulse tried to use the cluster/resources endpoint. Now checks if
the node is actually in a cluster before attempting efficient polling.
2025-08-17 20:09:45 +00:00
Pulse Monitor 2efb4326bf fix: set PBS status to offline when connection fails (addresses #326)
When both GetVersion and GetDatastores fail for PBS, properly set the
Status field to 'offline' and ConnectionHealth to 'error'. This prevents
the red dot from appearing when the instance state is undefined.
2025-08-17 19:06:06 +00:00
Pulse Monitor 50e06f2580 docs: clarify update process for different deployment types
- Add clear ProxmoxVE LXC update instructions (just type 'update')
- Fix incorrect FAQ about UI updates (no longer possible)
- Explain why Pulse cannot self-update for security reasons
- Make it clear that most users run in LXC containers
2025-08-17 18:57:20 +00:00
Pulse Monitor a5e5af221d chore: bump version to v4.4.0 2025-08-17 18:43:08 +00:00
Pulse Monitor 4e5d28341d fix: support authentication through Cloudflare tunnels and reverse proxies (#325)
- Detect when running behind a proxy/tunnel (X-Forwarded-*, CF-Ray headers)
- Use SameSite=None for cookies when proxied to allow cross-origin access
- Properly detect HTTPS when behind proxy using X-Forwarded-Proto
- Fixes authentication not working through Cloudflare tunnels

The issue was that SameSite=Strict/Lax cookies don't work when the origin
changes (which happens with tunnels/proxies). Now we detect proxy headers
and relax the cookie policy to SameSite=None when needed.
2025-08-17 18:11:47 +00:00
Pulse Monitor 4080f8fd05 fix: properly address syslog spam on non-clustered nodes (#322)
- Mark deprecated poll functions that cause duplicate GetNodes() calls
- Add warnings when deprecated functions are called directly
- Previous fix only created WithNodes versions but didn't prevent the originals from being called
- This completes the fix started in commit fcd782370
- Reduces API calls and prevents certificate verification spam in syslog

The deprecated functions (pollVMs, pollContainers, pollStorage, pollStorageBackups)
still exist for backward compatibility but log warnings if called.
2025-08-17 17:03:48 +00:00
Pulse Monitor 52e5000ca0 chore: bump version to v4.4.0-rc.2 2025-08-17 11:31:07 +00:00
Pulse Monitor 9f6d30ed62 docs: add Updating section with new install script options
- Document --rc, --stable, and --version flags
- Show how to update to RC releases
- Include both script and Docker update methods
- Make it clear how users can test pre-releases
2025-08-17 11:15:57 +00:00
Pulse Monitor 9665e86df1 feat: add command line arguments to install script (addresses #324)
The install script now accepts arguments that work with piped execution:
- --rc or --pre: Install latest RC/pre-release
- --stable: Force stable version (default)
- --version VERSION: Install specific version
- --help: Show usage

This allows users to update to RC versions with:
curl -fsSL .../install.sh | bash -s -- --rc
2025-08-17 11:11:26 +00:00
Pulse Monitor 64cbad8ad0 fix: install script not detecting RC channel properly (addresses #324)
- Check system.json for configured update channel
- Fetch pre-releases when RC channel is configured
- Support PULSE_UPDATE_CHANNEL env var to force RC updates
- Users can now update to RC versions with:
  PULSE_UPDATE_CHANNEL=rc curl -fsSL ... | bash
2025-08-17 11:05:02 +00:00
Pulse Monitor 8939d83016 fix: install script not working when piped through bash (addresses #324)
The read command needs to explicitly read from /dev/tty when the script
is piped through bash (curl ... | bash) otherwise it can't read user input
2025-08-17 10:48:19 +00:00
Pulse Monitor a0e9b88b85 docs: completely rewrite Docker documentation for clarity
- Add clear First-Time Setup section explaining the wizard
- Reorganize to show basic setup first (recommended)
- Move pre-configured auth to Advanced section
- Add troubleshooting for common Docker-specific issues
- Include examples for generating credentials
- Clarify the 206728 escaping requirement in docker-compose.yml
- Add security best practices section
2025-08-17 10:28:22 +00:00
Pulse Monitor ad84deb9d8 docs: update documentation for mandatory authentication in v4.4.0
- Remove outdated v3 to v4 migration guide
- Update README with mandatory security setup steps
- Clarify that authentication is now required, not optional
- Update Docker, Security, and Troubleshooting docs
- Remove references to optional authentication
2025-08-17 10:21:36 +00:00
Pulse Monitor e89f469498 chore: bump version to v4.4.0-rc.1 2025-08-17 09:47:47 +00:00
Pulse Monitor 97c3e49cb0 fix: handle Discord webhook grouped alerts properly
- Discord embeds don't support newlines in description field
- Use comma-separated list format for Discord grouped alerts
- Keep escaped newlines for other webhook providers (Telegram, Slack, Teams)
- Prevents JSON parsing errors with Discord webhook API

Discord now shows: "Alert | 🔔 5 alerts: • item1: 25.4%, • item2: 11.6%, ..."
Other providers show multi-line format with proper escaping.
2025-08-17 09:30:19 +00:00
Pulse Monitor c06fc309a3 fix: improve webhook notifications for all providers
- Show full list of grouped alerts for Discord, Slack, Teams, etc (not just Telegram)
- Properly escape newlines in grouped alert messages to prevent JSON parsing errors
- Ensure consistent formatting across all webhook providers
- Address issue where only custom templates showed complete alert lists

All webhook providers now display the same detailed grouped alert format with bullet points showing each alert's resource and value.
2025-08-17 09:01:57 +00:00
Pulse Monitor adc2bae032 feat: show complete alert list in grouped notifications instead of truncating 2025-08-17 08:12:48 +00:00
Pulse Monitor edb4c8e0f2 fix: guest alerts and webhook notifications working properly
- Fixed double CPU percentage multiplication for containers/VMs
- Added CheckGuest calls to efficient polling path
- Fixed newline escaping in grouped webhook notifications
- Guest alerts now properly trigger for containers and VMs

These changes address issues where guest alerts weren't being triggered
at all due to the efficient polling path not calling CheckGuest, and
webhook notifications were failing due to unescaped newlines in grouped
alert messages breaking JSON templates.
2025-08-17 08:07:39 +00:00
Pulse Monitor aa4a26d42c fix: escape newlines in grouped alert messages for JSON webhook templates
Webhooks weren't being sent because the grouped alert message contained actual
newlines which broke JSON parsing in custom templates. Changed to use escaped
newlines (\n) which work properly in JSON strings.
2025-08-17 07:55:44 +00:00
Pulse Monitor b6e27143a7 improve: enhance Telegram notification formatting and grouped alerts
- Fixed duplicate 'usage' text in storage alerts (Storage usage usage → Storage at X%)
- Improved grouped alerts to show details of other alerts instead of just count
- Added severity indicators (🔴 critical, 🟡 warning, 🟢 info)
- Better formatting with current value, threshold, type, duration, and timestamp
- Cleaner message structure with proper Markdown formatting
- Shows up to 3 additional alerts in grouped notifications with their values
2025-08-17 07:35:12 +00:00
Pulse Monitor 35d586fc3a fix: webhook templates for grouped alerts not being used
- Fixed same template overwriting bug in sendGroupedWebhook function
- Grouped alerts now properly use custom templates
- Telegram webhooks now work for both individual and grouped alerts
- Successfully tested Telegram webhook delivery
2025-08-17 07:27:08 +00:00
Pulse Monitor 625fac99b5 fix: prevent setup screen showing on rate limit and exclude status checks from auth rate limiting
- Login component now handles 429 rate limit responses correctly
- When rate limited, assume auth is configured and show login form
- /api/security/status endpoint excluded from strict auth rate limiting
- Status checks now use general API rate limit (500/min) instead of auth limit (10/min)
- Fixes issue where rapid logout/login could trigger rate limiting
- Fixes setup screen appearing incorrectly when rate limited
2025-08-17 07:08:42 +00:00
Pulse Monitor 445adaa340 fix: respect saved theme preference over system preference
- Only use system color scheme preference if user has never set a theme
- Once user sets a theme preference, always respect it
- Properly remove dark class when in light mode on App initialization
- Fixes theme changing unexpectedly after login
2025-08-17 07:04:18 +00:00
Pulse Monitor 6c837d21fa fix: apply theme preference on login page
- Login component now applies saved theme preference on mount
- Theme preference correctly persists across logout/login in all modes
- Fixes issue where login page would revert to default theme after logout
2025-08-17 07:00:15 +00:00
Pulse Monitor 6c37ad11e9 fix: correctly preserve theme preference on logout
- Fixed bug where theme was not being preserved using correct storage key
- Now properly uses STORAGE_KEYS.DARK_MODE instead of 'theme'
- Theme preference now correctly persists across logout/login cycles
2025-08-17 06:51:23 +00:00
Pulse Monitor 89a9d02e01 fix: preserve theme preference on logout (addresses #318)
- Theme now persists when user logs out and logs back in
- Added documentation for BACKEND_HOST environment variable (addresses #321)
- Users can now bind to localhost only for reverse proxy setups
- Improved documentation for network configuration options
2025-08-17 06:46:38 +00:00
Pulse Monitor 3edef396d8 chore: cleanup test files and scripts
- Removed test scripts created during debugging sessions
- Removed telegram setup scripts and configs
- Removed test binaries and build artifacts
- Cleaned up repository structure
2025-08-17 06:40:17 +00:00
Pulse Monitor 97e317148c fix: webhook custom templates not being used when service field is empty
- Fixed bug where custom webhook templates were being overwritten with generic payload
- The issue occurred when a webhook had a custom template but empty service field
- Now properly preserves custom template payloads regardless of service field value
- Telegram webhooks and other custom template webhooks now work correctly
- Addresses user reports of webhook delivery issues
2025-08-16 21:57:27 +00:00
Pulse Monitor 053e4da097 fix: improve webhook test notifications with realistic values
- Use realistic test values (85.5% CPU, 80% threshold) instead of zeros
- Set alert level to 'warning' instead of 'info' for better visibility
- Add 5-minute duration to test alerts for realistic testing
- Improve test message to be more descriptive
- Fix empty message text issue in Telegram webhooks

The webhook system now sends proper test notifications that accurately
simulate real alerts, making it easier to verify webhook configurations.
2025-08-16 21:46:33 +00:00
Pulse Monitor ddaeab5d5e fix: major webhook system improvements and bug fixes
- Re-enable JSON validation that was accidentally commented out
- Fix Telegram chat_id handling with proper validation
- Add smart retry logic that distinguishes retryable from permanent errors
- Enhance error logging to include response bodies for debugging
- Add webhook URL validation for security (prevent SSRF)
- Fix deprecated strings.Title function usage
- Add webhook delivery history tracking
- Improve template variable substitution
- Add exponential backoff for retries (max 30 seconds)
- Validate numeric chat IDs for Telegram webhooks
- Add comprehensive error handling and logging

Tested with Telegram, Discord, and Slack - all working correctly now
2025-08-16 21:39:31 +00:00
Pulse Monitor fbbbb3b867 fix: comprehensive security improvements and UI fixes
- Remove overly restrictive password complexity requirements (now only 8+ chars)
- Fix Change Password section not appearing in Settings > Security
- Fix logout sometimes showing setup page instead of login page
- Remove misleading desktop notifications option from first-run setup
- Improve rate limiting on authentication endpoints
- Fix sensitive data appearing in logs (passwords, tokens)
- Enhance file permissions for sensitive files (0600)
- Fix WebSocket origin validation defaults
- Add password complexity validation for setup
- Improve CSRF token handling after server restarts
- Fix security status API using wrong fetch client
- Add logout race condition prevention

Security improvements:
- No credential leakage in logs
- Proper bcrypt password hashing
- Session management enhancements
- Rate limiting on all auth endpoints
- Secure file permissions on sensitive data
2025-08-16 21:10:24 +00:00
Pulse Monitor 8fe81b5712 fix: use authenticated requests for setup-script-url endpoint
The copy button in NodeModal was using plain fetch() instead of apiFetch() for the /api/setup-script-url endpoint, causing 401 errors when authentication is configured. Updated both PVE and PBS setup script generation to use authenticated requests.
2025-08-16 19:11:13 +00:00