Commit graph

106 commits

Author SHA1 Message Date
Pulse Monitor
b968d91dcd feat: include guest metadata in config export/import
- guest URLs are now backed up with config export
- restored on import to preserve custom URLs across migrations
- stored in plain text (not encrypted) as they're just service URLs, not credentials
- import failures for guest metadata are non-fatal (logged as warnings)
2025-08-12 16:54:18 +00:00
Pulse Monitor
b9a768b5e6 feat: add per-guest custom URL functionality
- guests can now have custom URLs that make their names clickable
- added metadata store for persisting guest metadata to JSON files
- added API endpoints for managing guest metadata
- integrated edit button in dashboard to set/edit custom URLs
- guest names become clickable links when custom URL is set
2025-08-12 16:35:14 +00:00
Pulse Monitor
782651e24e feat: make node names in summary cards clickable
- Node names in the summary cards at the top now link to Proxmox web interface
- Matches the behavior of node names in the table rows below
- Uses same hover effect (blue color) for consistency
2025-08-12 16:19:02 +00:00
Pulse Monitor
75f4b74b83 feat: implement API token management UI (addresses #302)
- Add interactive API token management in Settings > Security tab
- Users can now generate, view, regenerate, and delete API tokens from the UI
- Tokens are persisted in system.json and survive restarts
- Environment variable API_TOKEN still takes precedence for backward compatibility
- Proper authentication enforcement when tokens are configured
- Secure token generation using crypto/rand (32 bytes, hex encoded)
- Clean UI with copy-to-clipboard functionality for newly generated tokens
2025-08-12 15:32:23 +00:00
Pulse Monitor
ef3789e9e0 feat: add RC badge to header for release candidate versions
The Pulse logo now displays an orange "RC" badge when running a release
candidate version. This helps users identify when they're testing pre-release
versions.

- Backend now detects RC versions and sets channel field accordingly
- Frontend displays RC badge next to Pulse logo when channel is "rc"
- Works for both git-based and VERSION file-based builds
2025-08-12 14:47:21 +00:00
Pulse Monitor
e42c1ab4e8 chore: bump version to v4.3.1-rc.1 2025-08-12 14:29:37 +00:00
Pulse Monitor
8492b0932d fix: dashboard now uses actual configured host URLs for node links
addresses #306 - The dashboard and storage views were hardcoding port 8006 for node links,
but now they properly use the host URLs from the node configuration. This ensures users
are redirected to the correct URL when clicking on node names, respecting custom ports
and protocols configured in the settings.

- Added host field to Node struct in Go models
- Updated monitor.go to populate host field from instance config
- Added host field to TypeScript Node interface
- Modified Dashboard and Storage components to use nodeHostMap for correct URLs
- Falls back to old behavior if host field is not available
2025-08-12 14:28:19 +00:00
Pulse Monitor
b77df2f2f1 feat: add custom webhook payload templates and fix Telegram chat_id handling
- Add custom JSON payload template support for generic webhooks
- Users can now define custom webhook formats with Go template syntax
- Fix Telegram webhook issue where chat_id in URL caused 400 errors
- Automatically strip chat_id from URL and place in JSON body for Telegram
- Add comprehensive webhook documentation with examples
- Update API documentation with webhook endpoints

Addresses #305
2025-08-12 14:03:13 +00:00
Pulse Monitor
6765db9b13 chore: bump version to v4.3.0 2025-08-12 13:09:09 +00:00
Pulse Monitor
cf3fefabda fix: correct webhook icon URLs and add release notes
- Fix Discord webhook templates to use logo.svg instead of non-existent favicon.svg
- Add comprehensive release notes for v4.3.0 about embedded frontend breaking change
- Document migration path and benefits of embedded frontend

The embedded frontend is a significant architectural improvement that eliminates
path-related issues but requires clear communication to users about the change.
2025-08-12 12:59:02 +00:00
Pulse Monitor
d5d359ce45 fix: update systems to work with embedded frontend
- Fix auto-updater to handle single-binary structure
- Fix Docker build to copy frontend before Go compilation
- Add development script for frontend rebuilds
- Remove unnecessary frontend directory copying in updater

The embedded frontend change simplifies deployment but required
updates to various build and update systems.
2025-08-12 12:52:27 +00:00
Pulse Monitor
5d50fe06da feat: embed frontend in Go binary for simplified deployment
Addresses #304 - Eliminates redirect loops and path issues by embedding
the frontend directly in the Go binary using go:embed

- Frontend is now embedded at compile time, no separate files needed
- Simplified tarball structure - just the binary and config files
- No more path searching or frontend directory issues
- Works consistently across all installation methods
- Smaller deployment footprint and simpler installation

This change makes Pulse a true single-binary deployment, eliminating
the complexity of managing separate frontend files and the issues that
arose from different installation structures.
2025-08-12 12:45:57 +00:00
Pulse Monitor
8431a49329 fix: improve frontend file discovery to prevent redirect loops
- Add multiple search paths for frontend files
- Check parent directories when binary is in bin/ subdirectory
- Support both tarball extraction and installed structures
- Fixes issue #304 where manual tarball extraction caused redirect loops
- Maintains compatibility with community scripts
2025-08-12 12:33:40 +00:00
Pulse Monitor
1cdc6a011c chore: bump version to v4.2.1 2025-08-12 10:52:51 +00:00
Pulse Monitor
c62952e070 fix: email test now uses saved password when not provided
- Test email button now works without re-entering password
- Backend uses saved password if test request has empty password
- Fixes authentication error when testing email notifications
2025-08-12 09:47:05 +00:00
Pulse Monitor
46a697613a fix: remove sensitive data from logs
Updated logging to exclude request bodies that may contain passwords
or other sensitive information. Now only logs metadata about requests
without exposing actual credentials.
2025-08-12 08:41:17 +00:00
Pulse Monitor
7dbcb5461c fix: addresses #299 - email notifications not working
Fixed two critical issues with email notifications:
1. Test email API now returns errors properly instead of always showing success
2. Added timeouts to SMTP connections to prevent hanging (10s dial, 30s overall)

The root cause of users not receiving emails was that errors were being
silently logged instead of returned to the API, making it appear successful
when it wasn't. SMTP connections could also hang indefinitely on unreachable
servers.

Note: API uses "server" and "port" JSON fields, not "smtpHost"/"smtpPort"
2025-08-12 08:04:04 +00:00
Pulse Monitor
c111738825 chore: bump version to v4.2.0 2025-08-11 16:05:09 +00:00
Pulse Monitor
9f6a3d1b5f fix: multiple UI and configuration issues (addresses #295, #296)
Frontend fixes:
- Fixed VM thresholds incorrectly showing as 'CT' in alerts UI (issue #295)
- Fixed threshold slider not reaching 0% and 100% edges (issue #295)
- Fixed PBS form auto-filling with PVE settings (issue #296)
- Fixed email config property mapping (server/port instead of smtpHost/smtpPort)

Backend fixes:
- Updated EmailConfig struct to use 'server' and 'port' JSON tags for consistency
- Added 'provider' and 'startTLS' fields to EmailConfig
- Fixed PORT env var to correctly set FrontendPort instead of BackendPort
- Changed default log level from Debug to Info

All changes tested and verified working correctly.
2025-08-11 15:29:53 +00:00
Pulse Monitor
378ebcb250 Major improvements to security, alerts, and ease of use
Security enhancements:
- Fixed critical issue: PBS tokens no longer logged in plaintext
- PVE tokens now properly masked in all log outputs
- Enhanced token security documentation

Alert system fixes:
- Fixed storage alerts not working due to threshold being 0
- Added automatic defaults preservation for alert thresholds
- Storage alerts now properly trigger at 85% usage

Node management improvements:
- Fixed node deletion causing 'Node not found' errors
- Added instant discovery refresh when nodes are deleted
- Added manual refresh buttons for discovery
- Fixed PBS token cleanup in auto-registration scripts
- Fixed /dev/tty errors when running scripts in Docker containers

Bug fixes:
- Fixed CPU MHz field type mismatch causing JSON unmarshal errors
- Suppressed non-critical container snapshot API errors
- Fixed auto-registration using Docker internal IPs instead of actual host IPs

Documentation updates:
- Added comprehensive security documentation
- Streamlined setup documentation focusing on ease of use
- Removed marketing language and consolidated repetitive content

Frontend improvements:
- Added WebSocket support for real-time node updates
- Added discovery refresh buttons in Settings
- Improved node deletion feedback
2025-08-11 13:59:58 +00:00
Pulse Monitor
161bbf5ec4 fix: exclude ct templates and isos from backup tab (fixes #265)
- filter out vztmpl (container templates) from backup list
- filter out iso files from backup list
- only show actual vm/container backups in the backup tab
- remove unnecessary checks for template/iso content types
2025-08-11 10:13:12 +00:00
Pulse Monitor
0491abf885 fix: prevent cpu alerts for non-running vms and containers (fixes #273)
- check if vm/container status is "running" before using cpu value
- set cpu to 0 for stopped, paused, suspended states
- prevents false high cpu alerts for offline vms
- handles all non-running states, not just "stopped"
2025-08-11 10:08:41 +00:00
Pulse Monitor
2a965b2a05 fix: ensure all webhook services use proper payload formats
- extend webhook template support to all services (slack, teams, pagerduty)
- properly detect service type and apply correct template
- add pagerduty routing_key support from headers
- fallback to generic json only when no template exists
- handle both individual and grouped alerts for all services
2025-08-11 09:49:59 +00:00
Pulse Monitor
94a74fdcfe fix: telegram webhook payload format and pbs connection issues (fixes #294)
- add proper telegram bot api support with chat_id and text fields
- fix frontend pbs red dot display (was checking 'error' instead of 'unhealthy')
- fix qemu guest agent memory reporting (fallback to mem when freemem is 0)
- extract chat_id from telegram webhook urls when present
2025-08-11 09:38:09 +00:00
Pulse Monitor
2f2ab19c0b fix: QEMU guest agent VMs now show memory usage correctly
- Fall back to vmStatus.Mem when guest agent doesn't report FreeMem
- Fixes issue where VMs with guest agent showed 0% memory usage
- Addresses issue #294
2025-08-11 08:45:49 +00:00
Pulse Monitor
c7a96f9d39 chore: bump version to v4.1.8 2025-08-11 07:57:50 +00:00
Pulse Monitor
6922a79d59 fix: reload alert and notification configs after import
- Import was saving configs to disk but not updating in-memory state
- Added explicit reloading of alert thresholds after import
- Added explicit reloading of webhooks after import
- Added explicit reloading of email config after import
- Settings now show immediately in UI without requiring restart

Fixes #291 where imported alert thresholds and webhooks weren't
visible until after service restart
2025-08-10 22:29:14 +00:00
Pulse Monitor
30fe499437 improve: Docker persistence fix with better error handling
- Use consistent utils.GetDataDir() helper instead of duplicating logic
- Handle migration failures gracefully - log warnings but continue using old key
- Add detailed logging for migration with source and destination paths
- Prevent unnecessary migration when paths are identical
- Improve error messages for debugging

Addresses review feedback on the Docker persistence fix
2025-08-10 22:09:48 +00:00
Pulse Monitor
9587528157 fix: Docker persistence by storing encryption key in data volume
- Move encryption key from /etc/pulse to PULSE_DATA_DIR (/data in Docker)
- Add automatic migration for existing installations
- Key now persists across container restarts when using volume mount
- Maintains backward compatibility for non-Docker installations

Fixes #290 reported by da99Beast where Docker containers lost
configuration on restart due to encryption key being regenerated
2025-08-10 22:04:14 +00:00
Pulse Monitor
256d168d54 fix: update hardcoded fallback version to 4.1.7
The binary was using 4.1.6 as the fallback version when VERSION file
wasn't found, causing version mismatches in some installations
2025-08-10 20:49:29 +00:00
Pulse Monitor
068322bb45 feat: add DISCOVERY_SUBNET environment variable support for Docker network discovery configuration 2025-08-10 19:44:31 +00:00
Pulse Monitor
ba6bf68acc fix: update system to handle new tarball structure and permission issues
- Support both old (root) and new (bin/) tarball structures
- Use writable directories for temp and backup files (data dir instead of /tmp)
- Fixes update failures for users on v4.1.5 and earlier
2025-08-10 19:38:40 +00:00
Pulse Monitor
14dcdfc4d6 fix: Discord webhook avatar URLs pointing to wrong repository 2025-08-10 19:23:31 +00:00
Pulse Monitor
eef3ebf354 fix: critical bugs in v4.1.5
- Fixed hardcoded version fallback showing 4.1.1 instead of current version
- Fixed install script syntax error that prevented fresh installations
- Identified root cause of Docker persistence issue (notification UI not saving)
- Identified missing save functionality in frontend notification settings

Issues addressed: #277, #278, #282
2025-08-10 18:49:51 +00:00
Pulse Monitor
fbf8e5f1ce fix: RAM usage calculation and webhook test functionality
- Fixed incorrect RAM usage display for VMs without guest agent (issue #280)
  - VMs without guest agent now show 0% usage instead of 100%
  - Only show actual usage when guest agent provides FreeMem data
  - Containers continue to show accurate usage as before

- Fixed webhook test functionality (issue #279)
  - Added proper webhook ID handling in test notification endpoint
  - Created SendTestWebhook method to test specific webhooks
  - Frontend can now successfully trigger webhook tests
2025-08-10 10:59:26 +00:00
Pulse Monitor
bb3f783b59 refactor: implement directory-based auto-update approach
Replaced sudo-based updater with a cleaner directory-based approach:
- Pulse binary now installs to /opt/pulse/bin/pulse (owned by pulse user)
- Symlink created at /usr/local/bin/pulse for PATH convenience
- Pulse user has full write access to /opt/pulse, enabling self-updates
- Removed sudo dependency and security risks
- Simplified update logic - no special scripts or permissions needed

This is more secure, simpler, and works in all environments (containers, VMs, bare metal)
2025-08-10 09:48:53 +00:00
Pulse Monitor
1da7ca4ea7 feat: add timestamp to token names for true uniqueness
Token names now include both Pulse server IP and Unix timestamp (e.g. pulse-192-168-0-176-1754816525) ensuring each script run creates a unique token. This completely eliminates 'token already exists' errors when running setup scripts multiple times.
2025-08-10 09:02:52 +00:00
Pulse Monitor
5a98e05cb0 feat: add Pulse server IP to token names for uniqueness
When running the setup script multiple times from different Pulse servers, tokens now include the Pulse server's IP address in the name (e.g. pulse-192-168-0-176) to avoid conflicts. This prevents 'token already exists' errors when managing multiple Pulse instances.
2025-08-10 08:58:04 +00:00
Pulse Monitor
aafa90f9db fix: enable PBS backup monitoring by default
- PBS instances now have MonitorBackups enabled by default
- Fixes issue where PBS backups weren't showing in the UI
- Bump version to v4.1.1
2025-08-10 08:27:20 +00:00
Pulse Monitor
6d633aa486 fix: correct hardcoded fallback version to 4.1.0 2025-08-10 07:44:40 +00:00
Pulse Monitor
68e8ef69f6 fix: Docker permission issues and alert history file access
- Fixed Docker entrypoint to properly handle running as root (PUID=0)
- Improved alert history loading to handle permission errors gracefully
- Container now correctly runs as root when PUID=0 is set
- Alert history continues loading even if backup file has permission issues

Addresses #266 and #262
2025-08-10 06:51:45 +00:00
Pulse Monitor
f8ef3f9259 fix: multiple critical issues in monitoring and notifications
- PBS instances now show as online when datastores are accessible even if version endpoint fails
- Email sending now uses proper STARTTLS support for compatibility with providers like SMTP2GO
- Email recipient input no longer filters entries while typing
- Auto-update setting now properly persists and loads from config
- Fixed CPU usage alerts for offline VMs (already addressed in previous commits)
2025-08-09 23:26:12 +00:00
Pulse Monitor
0ebfb8ec01 hotfix: backup type detection for PBS backups
- Added format field checking for pbs-ct and pbs-vm
- Changed unknown type fallback from VM to LXC (more common)
- Fixes issue where all backups showed as VM type
2025-08-09 22:42:04 +00:00
Pulse Monitor
a368d3b3c9 attempt to address: Discord webhooks, backup types, storage duplicates, alert issues
- Added service field to WebhookConfig to identify Discord webhooks
- Use Discord-specific template when sending Discord webhooks
- Fixed backup type detection for PBS backups (vm/ct)
- Fixed shared storage duplicate IDs across instances
- Fixed alert acknowledge/clear response format to match frontend expectations
2025-08-09 22:27:10 +00:00
Pulse Monitor
3f897f42fa fix: clear user instructions for manual refresh after updates 2025-08-09 21:43:17 +00:00
Pulse Monitor
4c8094e4ac fix: auto-restart after update using clean exit strategy 2025-08-09 20:57:00 +00:00
Pulse Monitor
311ef7619e fix: critical production issues for v4.1.0-rc.5
- Fixed Discord/Slack/Teams webhooks not persisting (Issue #272)
- Fixed email recipients not saving and Enter key issue (Issue #270)
- Fixed auto-update toggle not saving (Issue #269)
- Fixed false CPU alerts for stopped VMs/containers (Issue #273)
- Automatic alert clearing for stopped guests
- Preserve passwords when updating email config

chore: bump version to v4.1.0-rc.5
2025-08-09 18:27:30 +00:00
Pulse Monitor
7f414623fc fix: ensure consistent CPU core display for all guests
- Fix CPU core display to show for all guests with CPU data
- Previously only showed cores when CPU > 0 (truthy)
- Now shows "(0.0/X cores)" consistently for all running/stopped guests
- Improve code organization with new helper utilities
- Clean up import statements and remove debug logs
2025-08-09 15:03:28 +00:00
Pulse Monitor
fce003b559 fix: polling interval now persists through restarts
- System.json settings now take priority over environment variables
- Fixed issue where POLLING_INTERVAL env var would override saved settings
- Polling interval changes in UI now persist correctly after restart
2025-08-09 12:59:21 +00:00
Pulse Monitor
decce4f39f feat: implement secure registration token system with fixes
- Add registration token system for secure node auto-registration
- Implement token generation, validation, and revocation APIs
- Add frontend UI for managing registration tokens
- Fix polling interval hot-reload to work without restart
- Fix environment variable persistence for system settings
- Optimize monitor reload to avoid 'no nodes configured' message
- Fix goroutine leak in token manager cleanup
- Fix context propagation in reload logic
- Fix AUTO_UPDATE_ENABLED persistence bug
- Add proper error handling and security validation
- Ensure all resources properly cleaned up with defer statements
2025-08-09 11:54:26 +00:00