Push notifications
Get a browser notification when a monitor fires or recovers
Monitors already notify through channels such as Slack, PagerDuty and webhooks. Push notifications add a browser notification on every device where you turn them on. They are sent through Firebase Cloud Messaging, at the same moments as the other channels: when a monitor fires and when it recovers.
Turn them on
- Switch to the account whose alerts you want (your personal account or an organization).
- Open Settings → Notification Preferences and turn on Alert push notifications.
- Allow notifications when the browser asks.
Do this once per browser or device. Clicking a notification opens the alert in Foredeck.
One account per browser
A browser gets a single push token, and that token is registered to the account that was active when you turned push on. If you turn it on again while another account is active, the browser moves to that account. Turning the toggle off unregisters the token, and this browser stops receiving pushes.
Troubleshooting
- The toggle is disabled. Your browser doesn't support web push, or this deployment has no push key configured. On iPhone and iPad, web push only works after you add Foredeck to the Home Screen.
- "Notifications are blocked." You denied permission earlier. Allow notifications for this site in your browser's site settings, then turn the toggle on again.
- Nothing arrives. Check that the monitor actually changed state on the Alerts page, and that your operating system isn't silencing the browser's notifications (Focus / Do Not Disturb).
- Tokens that expire or are revoked are cleaned up automatically the next time Foredeck tries to send to them. Turn the toggle off and on to register a fresh one.
API
The toggle uses two endpoints on the events API. Both need a signed-in user (a Firebase ID token) and store the token against the active account:
POST /api/events/push-tokens {"token": "<FCM registration token>"}
DELETE /api/events/push-tokens/<token>Self-hosting? Set NEXT_PUBLIC_FIREBASE_VAPID_KEY (the web push certificate key from the Firebase console) when building the web app, and FCM_ENABLED=true on the events consumer.