Commit Graph

97 Commits

Author SHA1 Message Date
rcourtman 1c2431fcf6 refactor: add mock.env to repository with local override support
Make mock mode configuration part of the repository instead of a local-only
file. This ensures consistent mock mode behavior across all environments
(development, CI/CD, demo server) and makes it work out of the box for
new contributors.

Changes:
- Add mock.env to repository with sensible defaults (mock mode OFF by default)
- Support mock.env.local for personal overrides (gitignored)
- Update .gitignore to allow mock.env but exclude .local variants
- Backend loads mock.env then merges mock.env.local overrides
- hot-dev.sh loads both files in correct order

Benefits:
- New developers can clone and use mock mode immediately
- Demo server gets consistent mock configuration
- Personal preferences stay private in .local file
- No surprises - mock mode disabled by default in fresh clones
- CI/CD can use mock mode without custom configuration

Documentation:
- Updated README.md to explain mock.env is in repo
- Enhanced MOCK_MODE.md with local override instructions
- Updated claude.md with new configuration strategy
- Added mock.env.local.example for quick setup

Example workflow:
  git clone <repo>
  npm run mock:on        # Works immediately with repo defaults
  # Or create personal config:
  cp docs/development/mock.env.local.example mock.env.local
  # Edit mock.env.local with your preferences
2025-10-01 13:38:39 +00:00
rcourtman 67fc5977d1 feat: add hot-reloadable mock mode with auto-detection
Implement a hot-reloadable mock mode system that works seamlessly in both
development and production environments without requiring manual restarts
or port changes.

Key Features:
- Backend watches mock.env and auto-reloads when changed (via fsnotify + polling)
- npm commands for easy toggling: mock:on, mock:off, mock:status, mock:edit
- Works in both hot-dev mode and systemd deployments
- Reload completes in 2-5 seconds with no manual intervention
- No port changes or process restarts required

Implementation:
- Extended ConfigWatcher to monitor both .env and mock.env
- Added callback system to trigger ReloadableMonitor.Reload()
- Enhanced toggle-mock.sh to support both hot-dev and systemd modes
- Updated hot-dev.sh banner to show mock status and commands
- Created comprehensive documentation in docs/development/MOCK_MODE.md

Testing:
- Backend builds successfully
- Watcher initializes and monitors both files
- npm run mock:on/off toggles successfully
- mock.env updates correctly
- Scripts work in both hot-dev and systemd modes

Documentation:
- Added Mock Mode section to README.md
- Created detailed guide in docs/development/MOCK_MODE.md
- Updated claude.md with mock mode architecture and usage

Mock mode continues to return cached data instantly from memory
(no API calls, no locks, no timeouts), ensuring fast /api/state responses.
2025-10-01 13:35:17 +00:00
rcourtman 1d987efcc9 docs: fix VM disk monitoring documentation and remove false token limitation claims
Corrected widespread misinformation claiming API tokens cannot access guest agent data on Proxmox 9.

Changes:
- Rewrote VM_DISK_MONITORING.md with accurate technical explanation
- Deleted VM_DISK_STATS_TROUBLESHOOTING.md (contained false information)
- Updated FAQ.md with correct quick reference and troubleshooting link
- Added comprehensive VM disk troubleshooting section to TROUBLESHOOTING.md
- Fixed README.md troubleshooting reference
- Updated frontend tooltip to show accurate permission requirements
- Corrected backend log messages to remove "known limitation" language
- Updated test-vm-disk.sh diagnostic script with accurate guidance

Key corrections:
- API tokens work fine for guest agent queries on both PVE 8 and 9
- Proxmox API returning disk=0 is normal behavior, not a bug
- Both tokens and passwords work equally well
- Only requirements: guest agent installed + proper permissions
- Permission issues are config problems, not authentication method limitations

Documentation now provides clear user journey: FAQ → Troubleshooting → Full Guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 15:14:23 +00:00
Pulse Monitor 6f0bcf207d fix: resolve alert manager deadlock and add demo server link
- Fix deadlock in checkEscalations by releasing lock before processing alerts
- Add timeout protection in GetState when calling GetActiveAlerts
- Add read-only demo mode with middleware blocking modifications
- Add demo banner component for frontend
- Add demo server link to README (https://demo.pulserelay.pro)

addresses potential broadcast hangs in production environments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 14:58:54 +00:00
rcourtman 9852ef9047 Align dev ports and improve auto-register UX 2025-09-29 15:05:59 +00:00
rcourtman 6f4771ae2d feat: unify styling and improve cluster detection 2025-09-28 18:46:52 +00:00
Pulse Monitor 12ab1b0c6f docs: document --main install option for testing latest fixes
- Added to README.md Quick Start section
- Added comprehensive docs in INSTALL.md
- Explains when and why to use --main option
- Notes build dependencies requirement
2025-09-11 15:19:57 +00:00
Pulse Monitor 6491c2da14 docs: correct alert description to reflect current capabilities (addresses #431)
The README previously claimed alerts for 'VMs go down' but currently only node down detection is implemented. Updated to accurately reflect that alerts are for nodes, not individual VMs/containers.
2025-09-10 13:23:24 +00:00
Pulse Monitor 50382a89e5 docs: remove ProxmoxVE Helper Script references
The ProxmoxVE Helper Script is no longer the recommended installation method.
Users should use the official install.sh script instead, which supports
creating LXC containers directly on Proxmox hosts.

For existing users confused about updating (like in discussion #407), they
can use 'pct enter' from the Proxmox host to access their container as root.
2025-09-01 22:59:32 +00:00
Pulse Monitor 95d201cfc6 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 87ef949e1b 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 7e0c8ae42f docs: simplify project name from 'Pulse for Proxmox' to 'Pulse'
The context already makes it clear this is for Proxmox monitoring
2025-08-30 11:15:47 +00:00
Pulse Monitor 9c9da31bf2 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 eabe78dab1 docs: add comprehensive automatic update documentation
- Document auto-update feature in README
- Add detailed setup instructions in INSTALL.md
- Include auto-update configuration in CONFIGURATION.md
- Explain systemd timer behavior and controls
- Note that Docker doesn't support auto-updates
2025-08-27 15:43:03 +00:00
Pulse Monitor aa3044d487 feat: add dual authentication for setup scripts
- Setup scripts now accept both temporary setup codes and permanent API tokens
- Setup codes (6 chars): For manual setup by others, expire in 5 minutes
- API tokens: For automation and trusted environments, no expiration
- Modified auto-registration endpoint to accept API tokens directly
- Fixed JSON escaping issues with exclamation marks in bash scripts
- Updated README with clear documentation of both authentication methods
- Discovery modal now shows cached results immediately while scanning

This enables both secure manual setup (via temporary codes) and reliable
automation (via API tokens) without compromising security.
2025-08-25 21:47:48 +00:00
Pulse Monitor 4675b5bf92 improve: clearer VM disk monitoring error messages (addresses #348, #344)
- Add detailed logging when VM disk monitoring fails due to permissions
- Explain Proxmox 9 limitation: API tokens cannot access guest agent data (PVE bug #1373)
- Explain Proxmox 8 requirements: VM.Monitor permission and privsep=0 for tokens
- Update setup script to show appropriate warnings for each PVE version
- Update FAQ with troubleshooting steps for 0% disk usage on VMs
- Log messages now clearly indicate workarounds for each scenario

The core issue: Proxmox 9 removed VM.Monitor permission and the replacement
permissions don't allow API tokens to access guest agent filesystem info.
This is a Proxmox upstream bug that affects their own web UI as well.

For users experiencing this issue:
- PVE 9: Use root@pam credentials or wait for Proxmox to fix upstream
- PVE 8: Ensure token has VM.Monitor and privsep=0
- All versions: QEMU guest agent must be installed in VMs
2025-08-25 09:00:40 +00:00
Pulse Monitor 98cad9cf50 docs: remove unnecessary sudo from install commands
- LXC containers run as root and don't have sudo installed
- Updated all documentation to remove sudo references
- Updated frontend UI to show correct install command
- Keep sudo mention only in troubleshooting for edge cases
2025-08-24 22:56:21 +00:00
Pulse Monitor 3f8f1f7899 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 49c6507a72 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 d03fe05fef docs: remove emojis from README for more professional appearance 2025-08-22 08:01:33 +00:00
Pulse Monitor 35e3f986f4 improve: clarify configuration file separation and port setup
- Added comprehensive PORT_CONFIGURATION.md guide
- Updated CONFIGURATION.md to clarify .env is for auth only
- Install script no longer loads .env for environment variables
- Documented proper port configuration methods (systemd, system.json)
- Added port config guide to README documentation section

addresses #110 - helps users understand where to configure ports
2025-08-21 21:29:12 +00:00
Pulse Monitor ce8c1aaae9 docs: add clear Updating section to README
- Simple update commands for each installation type
- LXC containers just run 'update' command
- Standard installs re-run the installer
- Docker users pull and recreate
2025-08-21 20:59:07 +00:00
Pulse Monitor aac2145510 feat: add version command and privacy disclosure
- Added 'pulse --version' and 'pulse version' commands
- Version info embedded at build time (version, commit, build date)
- Added Privacy section to README - no telemetry/analytics
- Added example alert messages to show webhook capabilities
- Build script now properly embeds version information
2025-08-21 20:54:41 +00:00
Pulse Monitor b8d6358d7e docs: better README flow with context before install
- Removed overly aggressive Quick Install section
- Added brief description of what Pulse does
- Kept sponsorship section high for visibility
- Install command now in logical Quick Start section
- Better context and explanation before showing commands
2025-08-21 20:49:27 +00:00
Pulse Monitor 3006f0cb77 docs: make install command front and center
- Added Quick Install section right after title
- Single copyable command prominently displayed
- Moved detailed options lower in the document
2025-08-21 20:45:46 +00:00
Pulse Monitor f7840aae47 feat: major installer improvements for Proxmox environments
- Auto-detects Proxmox VE hosts and creates LXC containers
- Quick mode with sensible defaults (1GB RAM, 4GB disk)
- Advanced mode for full customization
- Automatic cleanup on failure
- Simple 'update' command in containers
- Improved error handling and network detection
- Professional, clean output without verbose noise
- Docker detection to prevent container-in-container
- Removed all references to community scripts

This is now the primary recommended installation method.
2025-08-21 20:43:56 +00:00
Pulse Monitor b535f09fb9 docs: prioritize official installer over community scripts in README
Changed install options order to recommend the official installer first for
systemd/bare metal installations, with community scripts as an alternative option
2025-08-21 18:34:27 +00:00
Pulse Monitor 8b6e2c07a8 docs: restore and improve Docker network discovery section with clearer explanation 2025-08-21 15:49:56 +00:00
Pulse Monitor ea475c08a6 docs: remove redundant Docker network discovery section 2025-08-21 15:49:06 +00:00
Pulse Monitor a4fd2c41b6 docs: make support section more honest about actual costs 2025-08-21 15:48:09 +00:00
Pulse Monitor e859adbd2b docs: fix support section - remove incorrect Proxmox licenses reference 2025-08-21 15:47:43 +00:00
Pulse Monitor 7d46b89c5a docs: improve support section with context and alternative support options 2025-08-21 15:46:51 +00:00
Pulse Monitor 12cdf8d369 feat: add disable alerts option for individual guests
- Add ability to completely disable alerts for specific guests in Custom Overrides
- Refactor override editing to use single form instead of inline editing
- Add dashboard indicators for guests with custom overrides (blue cog for custom thresholds, grey bell-slash for disabled)
- Remove complex Proxmox tag-based alert control system in favor of simpler UI controls
- Improve layout and UX for alert override management
2025-08-20 18:51:22 +00:00
Pulse Monitor dfcfc4f857 docs: clarify difference between pulse-no-alerts and pulse-monitor-only
- pulse-no-alerts: completely silent, no alerts generated at all
- pulse-monitor-only: alerts show in UI for manual checking, but no notifications sent
- updated descriptions to make the distinction clearer
- improved use case examples to show when to use each
2025-08-20 14:54:38 +00:00
Pulse Monitor 496861147d docs: reframe tags as direct VM control for both permanent and temporary use
removed incorrect 'temporary override' framing - users want permanent control for VMs with special needs (TrueNAS, Samba, Frigate, etc). tags are now presented as direct per-VM control that can be used for both permanent configuration and temporary needs

key insight: tags let users say 'this specific VM is special' vs custom rules for patterns
2025-08-20 14:41:34 +00:00
Pulse Monitor e5f830f1c1 refactor: clarify tags as operational overrides complementing custom rules
- updated documentation to clearly distinguish between:
  - Custom Rules: permanent alert policies configured in UI
  - Tags: temporary operational overrides applied in Proxmox
- improved log messages to indicate tags are temporary overrides
- added clear use cases and best practices for each approach
- emphasized that tags complement (not replace) custom rules
2025-08-20 14:37:00 +00:00
Pulse Monitor f1a3d9ff7b fix: make pulse-relaxed tag use fixed thresholds instead of additive
changed pulse-relaxed behavior to override with fixed values (95% CPU/RAM, 98% disk) rather than adding to existing thresholds. this avoids confusing interactions with custom alert rules and provides more predictable behavior

also updated docs to clarify the priority order of tags vs custom rules
2025-08-20 14:16:06 +00:00
Pulse Monitor 215ce78542 docs: add alert suppression using VM/CT tags
documented the new tag-based alert suppression feature that allows controlling alert behavior per VM/container without UI changes. includes pulse-no-alerts, pulse-monitor-only, and pulse-relaxed tags with examples
2025-08-20 14:12:22 +00:00
Pulse Monitor 70d043fb96 feat: smart network discovery for Docker environments
- Auto-detect Docker environment and scan common home/office subnets
- Scans 192.168.1.0/24, 192.168.0.0/24, 10.0.0.0/24, 192.168.88.0/24, 172.16.0.0/24
- Removes friction - nodes are discovered automatically without configuration
- DISCOVERY_SUBNET env var now optional (only for non-standard networks)
- Update documentation to reflect automatic discovery

This makes the first-run experience much smoother - users see their
Proxmox nodes immediately without having to figure out subnet configuration.
2025-08-19 15:32:26 +00:00
Pulse Monitor 7445cf7055 feat: auto-hash plain text credentials from environment variables
- Automatically hash plain text API tokens (SHA3-256) and passwords (bcrypt) when loaded from env vars
- Remove unnecessary PULSE_SETUP_TOKEN feature in favor of simpler env var approach
- Remove HandleInitialSetup endpoint - not needed with env var configuration
- Update authentication to always use hashed comparisons (no plain text warnings)
- Update documentation to clearly explain auto-hashing capability
- Maintain backward compatibility with pre-hashed credentials

This makes Pulse secure by default while keeping deployment simple - users can
provide plain text credentials via environment variables and Pulse automatically
hashes them for security.
2025-08-19 14:58:01 +00:00
Pulse Monitor 362ace960d docs: clarify environment variable precedence behavior
- Add clear warnings that env vars override UI/system.json settings
- Update log messages to indicate when env vars are overriding values
- Document standard container practice: env vars have highest precedence
- Users must remove env vars to allow UI configuration to take effect

This prevents confusion when UI changes don't work due to env var overrides.
2025-08-19 08:50:36 +00:00
Pulse Monitor 586aafd476 fix: restore environment variable support for key settings
- Re-enable DISCOVERY_SUBNET env var for Docker network configuration
- Re-enable LOG_LEVEL env var for runtime logging control
- Re-enable CONNECTION_TIMEOUT env var for timeout configuration
- Re-enable ALLOWED_ORIGINS env var for CORS configuration
- Update documentation to reflect working env vars

These env vars were accidentally disabled but are useful for Docker deployments.
Env vars override system.json settings when present.

Addresses #214 - user requested DISCOVERY_SUBNET env var support
2025-08-19 08:44:18 +00:00
Pulse Monitor 4a8f60cc13 fix: remove non-existent PBS Agent references and correct DISCOVERY_SUBNET docs
- Remove all PBS-AGENT.md references (hallucinated feature)
- Fix DISCOVERY_SUBNET env var name in Docker docs (was incorrectly PULSE_DISCOVERY_SUBNET)
- Add DISCOVERY_SUBNET examples to README for Docker users
- Update FAQ to clarify PBS push mode is not supported

Addresses #214 - user reported 404 on PBS-AGENT.md link
2025-08-19 08:30:27 +00:00
Pulse Monitor 0bd273d90c docs: update documentation for v4.5.0 release cycle 2025-08-18 22:28:49 +00:00
Pulse Monitor 6056e4f14a fix: remove non-existent PBS push mode feature from README
The PBS push mode/agent feature was never actually implemented in v4.
This was documentation for a planned feature that doesn't exist.
Removed PBS-AGENT.md correctly as the feature isn't present in the codebase.
2025-08-18 22:04:23 +00:00
Pulse Monitor 40e6ed89a7 chore: reorganize repository structure for better maintainability
- Move development scripts to scripts/ directory (dev.sh, hot-dev.sh, build.sh, etc.)
- Move UPGRADE_NOTICE to docs/ directory
- Remove empty 2025-08-14 file
- Update all references to moved scripts in documentation
2025-08-18 21:57:40 +00:00
Pulse Monitor d71d085f32 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 4d0fb221c8 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 64f3747c02 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 7b6a73c0a2 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