Commit Graph

565 Commits

Author SHA1 Message Date
Pulse Monitor cdfe1fe7ac fix: VM disk usage not showing when QEMU Guest Agent is enabled
The agent field in Proxmox can have values other than just 0 or 1 when features are enabled, causing the strict equality check (== 1) to fail. Changed to check for any value > 0 to properly detect when the agent is enabled.

addresses discussion #344
2025-08-24 07:56:04 +00:00
Pulse Monitor ffc6c2f931 fix: use correct terminology when installing different versions
- Says 'Updating to' when installing a newer version
- Says 'Downgrading to' when installing an older version
- Says 'Reinstalling' when installing the same version
- Says 'Installing' when current version is unknown

Added version comparison function to determine the right action word.
2025-08-24 07:48:01 +00:00
Pulse Monitor 69a4369efe fix: protect FRONTEND_PORT reference from unbound variable error
Added parameter expansion protection to prevent 'unbound variable' error when checking if FRONTEND_PORT is empty during updates.
2025-08-24 07:44:58 +00:00
Pulse Monitor 57d7b4ba65 fix: unbound FRONTEND_PORT variable error after update
The install script was failing with 'unbound variable' error after completing an update because FRONTEND_PORT is only set during fresh installations. Now extracts port from service file or uses default.
2025-08-23 23:34:26 +00:00
Pulse Monitor 472d726dce fix: install script exiting early when updateChannel not in system.json
The install script was using 'set -e' which caused it to exit when grep didn't find updateChannel in system.json. Added '|| true' to prevent early exit.

Also improved version detection with fallback when GitHub API is rate-limited.
2025-08-23 23:23:25 +00:00
Pulse Monitor 5e9333a334 fix: auto-update when --version flag is provided
Skip the interactive menu and directly update when a specific version
is requested via --version flag
2025-08-23 23:06:30 +00:00
Pulse Monitor 1f465441a4 fix: better TTY detection to avoid errors in pct exec 2025-08-23 23:04:08 +00:00
Pulse Monitor e40feff0cf fix: improve TTY handling in install script for non-interactive environments 2025-08-23 23:03:28 +00:00
Pulse Monitor a31ebd1e7d fix: install script no longer prompts for port during updates
The script now checks for existing installations before asking for
configuration. Updates will skip all prompts and just update the binary.
2025-08-23 23:02:12 +00:00
Pulse Monitor 02d5103aa6 fix: auto-registration now works with secured Pulse instances
The temporary auth tokens generated by authenticated users are now properly
validated even when Pulse has authentication enabled. This fixes the issue
where fresh installs (which are secured by default) couldn't use the
auto-registration feature.
2025-08-23 22:47:30 +00:00
Pulse Monitor 1834a703d5 refactor: simplify setup flow by removing setup code prompts
Replaced the two-step setup code process with a simpler token-in-URL approach:
- Auth token is now embedded directly in the setup URL
- No more prompting users for setup codes
- Same security level with better UX
- Backwards compatible with old setupCode field

The new flow generates a command like:
curl -sSL "http://pulse/api/setup-script?...&auth_token=TOKEN" | bash

This makes it much easier for users, especially in Proxmox shell where
interactive prompts can be problematic.
2025-08-23 22:16:01 +00:00
Pulse Monitor 8e9e6ea0aa improve: include setup code in command for easy Proxmox shell usage
- The generated command now includes PULSE_SETUP_CODE environment variable
- Users can simply copy-paste the command in Proxmox shell without needing to type the code
- Makes the setup process more streamlined for the primary use case
2025-08-23 21:54:14 +00:00
Pulse Monitor 11178dac57 chore: bump version to v4.7.4 2025-08-23 21:32:38 +00:00
Pulse Monitor 1774f6ca88 fix: improve setup code validation and environment variable handling
- Remove host validation from setup code authentication (only validate node type)
- Fix environment variable handling to check PULSE_SETUP_CODE before prompting
- Addresses issue where auto-registration failed with valid setup codes
2025-08-23 21:31:57 +00:00
Pulse Monitor db44a6ffc2 remove deprecated V3 detection code from install script
addresses #350 - removes the pre-v4 installation check that was causing false positives when .env files were accidentally placed in /opt/pulse. V3 is no longer supported.
2025-08-23 19:16:58 +00:00
Pulse Monitor 0b6b12eb65 fix: reorder alert routes to handle bulk operations correctly
The bulk endpoints must be checked before the general suffix matches
to prevent /bulk/acknowledge from being caught by the /acknowledge handler
2025-08-23 16:56:02 +00:00
Pulse Monitor 5effcab69b feat: add bulk alert operations and improve Proxmox permissions
- Add bulk acknowledge and clear operations for alerts
- Support selecting multiple alerts with checkboxes
- Add select all functionality for bulk operations
- Improve Proxmox permission setup to handle both PVE 8 and 9+
- Use PVEAuditor role which includes VM.GuestAgent.Audit for PVE 9+
- Add fallback VM.Monitor role for PVE 8 and below
- Bump version to 4.7.3
2025-08-23 16:37:37 +00:00
Pulse Monitor 8d5bc4e7c2 fix: correct Proxmox version detection parsing
- Fixed parsing of pveversion output (uses colon separator not slash)
- Now correctly extracts version number from 'pve-manager: X.Y.Z' format
- addresses #348
2025-08-23 08:14:07 +00:00
Pulse Monitor b0b55234d4 chore: bump version to v4.7.2 2025-08-23 07:46:36 +00:00
Pulse Monitor 2434ca7915 fix: add Proxmox 9 compatibility for VM guest agent permissions
- Detect Proxmox version in setup script
- Use VM.GuestAgent.Audit for PVE 9+ instead of VM.Monitor
- Update UI instructions to handle both PVE 8 and 9
- addresses #348
2025-08-23 07:45:56 +00:00
Pulse Monitor 9834e73ca4 fix: add Gotify to service dropdown to properly apply webhook template
- Gotify was missing from the service type dropdown
- Users were forced to use generic webhook which doesn't include required 'message' field
- Now users can select Gotify service type which applies the correct template
- Addresses #342 - actually fixes Gotify webhook notifications
2025-08-23 07:37:22 +00:00
Pulse Monitor 8febd23f48 fix: properly report HTTP errors in webhook tests
- Webhook test was showing success even when receiving 400/500 errors
- Now correctly reports HTTP status errors to the UI
- Added debug logging for Gotify webhooks to help troubleshooting
- Addresses #342 where Gotify webhooks appeared to work but didn't
2025-08-23 07:33:14 +00:00
Pulse Monitor c03f505584 chore: bump version to v4.7.1 2025-08-23 07:17:25 +00:00
Pulse Monitor e14b65b3b1 fix: make setup script endpoint public to address authentication errors
- Setup script no longer requires authentication (uses setup codes instead)
- Fixed discovery service not starting when toggled via settings
- Addresses #347 and discussion #344
2025-08-23 07:16:31 +00:00
Pulse Monitor 1a214a5b00 chore: bump version to v4.7.0 2025-08-22 19:55:08 +00:00
Pulse Monitor 7378490343 fix: correct PBS custom port handling
addresses #346

The issue was that the code was checking for specific ports (:8007 or :443) in the host string, which would incorrectly add the default port even when a custom port was already specified. Now it properly checks if any port exists after the protocol before adding the default.
2025-08-22 15:07:23 +00:00
Pulse Monitor 7ed89db58d fix: simplify PulseMonitor role creation in setup script
Delete and recreate the PulseMonitor role each time instead of trying to modify it. This ensures a clean, predictable state with exactly the permissions needed.

Also fixes incorrect pveum command syntax - should be 'role add' not 'role create'.

Addresses issue reported by NameLessJedi in #340
2025-08-22 14:56:03 +00:00
Pulse Monitor 2727696657 feat: add real-time theme synchronization across all connected clients
- Theme changes now broadcast instantly via WebSocket to all connected browsers
- No page refresh needed - theme updates in real-time across all devices
- Theme preference is persisted server-side and loaded on new sessions
- Added WebSocket message type 'settingsUpdate' for broadcasting settings changes
- Updated SystemSettingsHandler to broadcast theme changes to all clients
- Added frontend event listener to handle incoming theme change messages
- Fixed API endpoint routing to use the new handler with broadcast support
- Added proper DISABLE_AUTH check in CheckAuth for auth-disabled environments

This creates a seamless experience where toggling dark/light mode on one device
instantly updates all other connected devices (phones, tablets, browsers).
2025-08-22 14:30:19 +00:00
Pulse Monitor 9ae2b10231 fix: handle empty webhook templates properly (addresses #341)
When a webhook has an empty template string, don't try to use it - fall through to the service-specific template instead. This was causing Discord webhooks to send empty payloads resulting in errors.
2025-08-22 12:57:07 +00:00
Pulse Monitor 297ad450e1 chore: bump version to v4.7.0-rc.3 2025-08-22 11:20:57 +00:00
Pulse Monitor 9eb306ab3a fix: address PBS custom port handling issue #346
PBS was incorrectly appending default port :8007 even when custom ports were specified, resulting in malformed URLs like domain:443:8007. Now properly detects existing ports after the protocol prefix.
2025-08-22 11:06:29 +00:00
Pulse Monitor 12f79e77d4 feat: move discovery toggle to node tabs for better UX
- Added discovery toggle directly on PVE and PBS node tabs
- Toggle works instantly without needing to save
- Discovered nodes only show when discovery is enabled
- Removed discovery settings from System Settings tab
- More intuitive placement right where discovery results appear
2025-08-22 10:56:50 +00:00
Pulse Monitor 56eef233e1 docs: update configuration guide for encrypted webhooks 2025-08-22 10:22:07 +00:00
Pulse Monitor 6928c2e912 feat: encrypt webhook data at rest for improved security
Webhooks now stored encrypted (webhooks.enc) instead of plain text:
- Automatic migration from webhooks.json to webhooks.enc
- Uses same AES-256-GCM encryption as nodes and email configs
- Original file backed up as webhooks.json.backup
- Protects sensitive webhook URLs and authentication headers

This addresses the security concern where webhook URLs containing API tokens
(like Telegram bot tokens) were stored in plain text.
2025-08-22 10:19:42 +00:00
Pulse Monitor 35d2960c5f feat: add proxy authentication support
Implements header-based proxy authentication for SSO integration with
Authentik, Authelia, and other authentication proxies.

- Add CheckProxyAuth function to validate proxy headers
- Support for username and role-based access control
- Frontend integration with logout URL support
- Comprehensive documentation with examples
- Backwards compatible - no breaking changes

Addresses #327

Configuration via environment variables:
- PROXY_AUTH_SECRET: Shared secret for validation
- PROXY_AUTH_USER_HEADER: Header containing username
- PROXY_AUTH_ROLE_HEADER: Header containing roles/groups
- PROXY_AUTH_LOGOUT_URL: SSO logout endpoint
2025-08-22 09:47:18 +00:00
Pulse Monitor fc55700530 feat: auto-select update in non-interactive container mode
- Detect non-TTY environments when running with --in-container
- Automatically select appropriate update based on configured channel
- Prevents hanging on menu prompt in ProxmoxVE deployments
2025-08-22 08:55:12 +00:00
Pulse Monitor 7273c00d10 fix: handle unset UPDATE_CHANNEL variable in download_pulse function
Use parameter expansion to prevent 'unbound variable' error when UPDATE_CHANNEL is not set
2025-08-22 08:50:07 +00:00
Pulse Monitor b51dcd7004 feat: show both stable and RC version options in install script menu
- Users now see both stable and RC versions when updating
- Menu dynamically adjusts based on available versions
- Users can choose which version to install regardless of their update channel setting
- Addresses confusion about automatic RC updates
2025-08-22 08:39:11 +00:00
Pulse Monitor b2986ad6b7 fix: initialize UPDATE_CHANNEL variable before use in install script
addresses #345 - script was failing with 'unbound variable' error when UPDATE_CHANNEL was used before being initialized
2025-08-22 08:33:07 +00:00
Pulse Monitor 2f645ebcfb fix: respect disabled flag for storage device alerts
Storage devices with alerts disabled in the Thresholds tab were still
triggering alerts. Added proper checking of the disabled override flag
in CheckStorage() to match the behavior of guest alerts.
2025-08-22 08:30:39 +00:00
Pulse Monitor 1dcb102812 docs: remove emojis from README for more professional appearance 2025-08-22 08:01:33 +00:00
Pulse Monitor b462d5ebf8 fix: storage alert disabling now properly persists and displays
- Use rawOverridesConfig() for saving instead of rebuilding overrides
- Fix hasOverride flag to consider disabled state for storage/guests
- Toggle now reads current state from resource object
- Properly show "Custom" badge when alerts are disabled
2025-08-22 07:59:50 +00:00
Pulse Monitor 5416b5e6a5 fix: prevent page scrolling when toggling settings and fix storage alert disabling (#323)
- Add type="button" to all buttons to prevent form submission behavior
- Fix storage device alert disabling in threshold management
- Storage devices now properly handled in override configuration
2025-08-22 07:33:13 +00:00
Pulse Monitor 19bc8240a3 chore: bump version to v4.7.0-rc.2 2025-08-21 23:29:54 +00:00
Pulse Monitor 7af20b8c8d feat: add VM disk usage monitoring via QEMU guest agent
- Add GetVMFSInfo method to fetch filesystem data from guest agent
- Integrate guest agent disk stats for VMs in both polling modes
- Aggregate real disk usage from all filesystems (skip special mounts)
- Fall back gracefully to allocated size when agent unavailable
- Add VM.Monitor permission to auto-negotiation script via PulseMonitor role
- Update frontend NodeModal with new permission instructions

VMs with QEMU guest agent now show actual disk usage like LXCs do.
Addresses #344
2025-08-21 23:25:59 +00:00
Pulse Monitor c880b6552f fix: improve interactive detection for curl piped installations
Previous fix wasn't working properly - the menu showed but couldn't read input.
Now properly detects if we can write to /dev/tty to determine if interaction
is possible, even when stdin is piped from curl.
2025-08-21 22:44:42 +00:00
Pulse Monitor 9ff8eb1fc7 fix: allow interactive mode when using curl | bash for Proxmox installations
The script was detecting piped input and automatically going into non-interactive mode,
preventing users from choosing between Quick and Advanced installation modes.

Now checks if /dev/tty is available even when stdin is piped, allowing interaction
through the terminal for curl-based installations while still supporting truly
non-interactive environments (like automation scripts without any TTY).
2025-08-21 22:41:02 +00:00
Pulse Monitor b34c499327 fix: handle piped script execution for Proxmox container installs
When script is piped through curl, download a fresh copy to push
to the container instead of trying to use $0 which would be 'bash'
2025-08-21 22:26:48 +00:00
Pulse Monitor e8c6fd0b61 fix: simplify non-interactive detection for curl installations
Use simple 'test -t 0' to detect when script is piped through curl
Also use portable test command instead of bash [[ ]] syntax
2025-08-21 22:24:08 +00:00
Pulse Monitor a6db7c17ad fix: auto-select Quick mode for non-interactive Proxmox installations
When running via curl pipe, automatically use Quick installation mode
instead of waiting for input that will never come
2025-08-21 22:20:31 +00:00