Commit graph

31 commits

Author SHA1 Message Date
Pulse Monitor
f0bba12ba9 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
1bb954fdba 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
b64fb72282 fix: add Gotify webhook template with required message field
Addresses #342 - Gotify webhooks now include the required 'message' field
that was missing when using generic webhook payloads. The template also
includes proper priority mapping and markdown support.
2025-08-21 22:10:43 +00:00
Pulse Monitor
a21b1df058 fix: remove incorrect backslash escaping in webhook templates (#341)
Discord and other webhook notifications were failing with template parse
errors due to backslashes incorrectly escaping quotes in Go raw string
literals. Raw strings preserve backslashes literally, causing the Go
template parser to fail.

Fixes #341
2025-08-21 13:40:34 +00:00
Pulse Monitor
590c80ea63 feat: comprehensive alert system improvements
- Fixed alert units display (MB/s vs %) in notifications and UI
- Added missing threshold controls for disk I/O and network metrics
- Redesigned threshold table with active alert indicators
- Added ability to disable node connectivity alerts
- Improved visual distinction between defaults and overrides
- Added keyboard shortcuts for search (type to search, ESC to clear)
- Better threshold management with automatic cleanup of empty overrides
- Enhanced UI with proper units display for all metrics

addresses #336
2025-08-21 10:19:56 +00:00
Pulse Monitor
8431cfff7a improve: clarify Office 365 SMTP authentication requirements
- Update O365 email provider instructions to emphasize App Password requirement
- Add clear steps for generating App Passwords
- Explain that basic auth is deprecated and App Passwords are mandatory
- Add note about work/school account requirements

addresses user reports of O365 SMTP authentication failures
2025-08-19 09:43:05 +00:00
Pulse Monitor
8d17dd4567 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
b00e86fb8f 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
8e72d432c1 feat: show complete alert list in grouped notifications instead of truncating 2025-08-17 08:12:48 +00:00
Pulse Monitor
7999cd0189 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
e9193503bc 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
7a6e39087e 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
e8d75c27a3 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
91f60ed9b8 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
7281828787 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
1a994ba3c6 chore: add debug logging for notification troubleshooting 2025-08-14 20:46:52 +00:00
Pulse Monitor
327db5ad80 fix: add debug logging for Telegram webhook issues
- Enhanced logging to diagnose chat_id extraction problems
- Log payload being sent to Telegram for debugging
- Better error messages when chat_id is missing or invalid
2025-08-14 19:28:52 +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
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
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
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
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
14dcdfc4d6 fix: Discord webhook avatar URLs pointing to wrong repository 2025-08-10 19:23:31 +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
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
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
c5ca835e47 Fix email test validation to allow empty recipients
Remove the requirement for recipients in SendTestNotificationWithConfig
since the backend now handles empty recipients by using the From address.
2025-08-02 18:03:46 +00:00
Pulse Monitor
8e603b760d Fix email notifications to work with empty recipients
- Backend now uses From address as recipient when To array is empty
- Fixed sendEmail and sendGroupedEmail to not check for recipients
- Added detailed logging for SMTP operations
- Fixed recipient logging to show actual recipients sent

This allows users to send test emails to themselves without
having to enter their email address in the recipients field,
as promised by the UI.
2025-08-02 18:01:33 +00:00
Pulse Monitor
9566dd0cb8 Improve mobile responsiveness and fix email notifications
- Fix Gmail email configuration (field mapping between frontend/backend)
- Implement proper AES-256-GCM encryption for sensitive config files
- Add responsive column hiding for Storage tab on mobile devices
- Fix email configuration persistence and auto-populate recipients
- Add comprehensive testing tools for UI and API validation
- Fix alert acknowledge/clear functionality returning 404 errors
- Improve mobile UX: Storage shows only essential columns on small screens
- Revert dashboard to consistent table view (removed card layout experiment)
- Fix various UI issues: threshold detection, email template spacing
- Update notification system to use actual node data in test emails
2025-08-02 16:02:13 +00:00
Pulse Monitor
5665106a7d Initial clean Go + TypeScript rewrite
- Go backend with Proxmox/PBS integration
- Modern TypeScript/SolidJS frontend
- WebSocket real-time updates
- Clean project structure with no legacy code
2025-07-28 21:24:33 +00:00