ohdearapp / ohdear-pulse
Integrate Oh Dear with Laravel Pulse
Requires
- php: ^8.3
- illuminate/contracts: ^13.0
- laravel/pulse: ^1.10
- ohdearapp/ohdear-php-sdk: ^4.7
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.27
- orchestra/testbench: ^11.0
- pestphp/pest: ^5.0
- phpstan/phpstan: ^2.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-16 10:07:53 UTC
README
This package contains Pulse cards that show results from Oh Dear in your Laravel Pulse dashboard.
Version 2 requires PHP 8.3 or newer, Laravel 13, and Laravel Pulse 1.10 or newer. It uses the current Oh Dear monitor API through the official PHP SDK 4.7 or newer. See UPGRADING when coming from v1.
Version 2.1 adds certificate health, domain expiry and application health cards. Existing v2 configuration and cards continue to work unchanged. See the card guide for setup, result states and refresh intervals.
There are six cards available:
- Uptime and Performance
- Cron Job Monitoring
- Broken links
- Certificate health, including the issuer, expiry date and individual certificate checks
- Domain expiry and active registry statuses
- Application health checks, including warnings, failures and snoozes
The three cards added in v2.1, using real Oh Dear API data:
These screenshots show the uptime, scheduled-task and broken-link cards with real Oh Dear API data:
Installation
You can install the package via composer:
composer require ohdearapp/ohdear-pulse:^2.1
In your config/services.php file, add the following lines:
'oh_dear' => [ 'pulse' => [ 'api_key' => env('OH_DEAR_API_TOKEN'), 'monitor_id' => env('OH_DEAR_MONITOR_ID'), ], ],
Create an API token on the "API Tokens" page at Oh Dear. Use the monitor ID from your monitor's settings or its /monitors/{id} URL. Add OH_DEAR_API_TOKEN and OH_DEAR_MONITOR_ID to your application's environment. Never commit the token.
You can execute this artisan command to verify if you set up the configuration correctly.
php artisan ohdear-pulse:verify
Usage
The cards use these Livewire names:
ohdear.pulse.uptime: displays the uptime and performance of a siteohdear.pulse.cron: displays the results of the cron job monitoringohdear.pulse.brokenLinks: displays any broken links that were detectedohdear.pulse.certificateHealth: displays certificate validity and individual checksohdear.pulse.domain: displays the domain expiry date and registry statusesohdear.pulse.applicationHealth: displays individual application health results
You can add the cards to your Pulse dashboard, by first publishing the Pulse's dashboard view:
php artisan vendor:publish --tag=pulse-dashboard
Next, add the cards to the resources/views/vendor/pulse/dashboard.blade.php file:
<x-pulse> <livewire:ohdear.pulse.uptime cols="4" /> <livewire:ohdear.pulse.cron cols="8" /> <livewire:ohdear.pulse.brokenLinks cols="8" /> <livewire:ohdear.pulse.certificateHealth cols="4" /> <livewire:ohdear.pulse.domain cols="4" /> <livewire:ohdear.pulse.applicationHealth cols="4" /> {{-- Add more cards here --}} </x-pulse>
All cards accept an optional :monitor-id="123" attribute. Without it, they use services.oh_dear.pulse.monitor_id. Keep your application's Pulse authorization gate in place; these cards display monitoring data to anyone who can view the dashboard.
The uptime card shows the latest measured HTTP response and a chronological, 20-minute sparkline. Empty API buckets are not measurements. Non-HTTP monitors show their uptime status without an HTTP chart. Scheduled tasks and broken links include every page of API results in keyboard-scrollable tables.
Certificate, domain and application-health cards show the latest check results, not a history for Pulse's selected time range. They keep disabled, snoozed, pending and unavailable checks neutral. Empty detail responses show "No results" rather than a green success. Application warnings and failures raise the overall card severity, except for snoozed checks. Raw health metadata and registry responses stay on the server; labels, summaries and messages are escaped before display.
Domain dates come from the registry. Missing expiry dates are shown as "Not provided by registry"; the card does not invent a renewal date or impose its own warning threshold. Oh Dear determines expiry warning and failure severity.
Uptime and shared monitor data are cached for 30 seconds, scheduled tasks and the three new cards' detail data for one minute, and broken links for 15 minutes. Cache entries are scoped to the API token and monitor. The cards poll automatically and display recovery instructions if Oh Dear cannot be reached. Assets ship with the package; consumers do not need Node or a Tailwind build.
Testing
Running the test suite requires PHP 8.4 or newer for Pest 5. The package's runtime requirement remains PHP 8.3 or newer.
composer test composer analyse vendor/bin/pint --test npm ci && npm run build
Local Pulse dashboard
The repository includes a Workbench dashboard using real API data:
composer install composer build vendor/bin/testbench key:generate
Add OH_DEAR_API_TOKEN and OH_DEAR_MONITOR_ID to the generated vendor/orchestra/testbench-core/laravel/.env, then run composer start. Optionally set OH_DEAR_BROKEN_LINKS_MONITOR_ID or OH_DEAR_DOMAIN_MONITOR_ID to use a different monitor for those cards. Open /pulse on the development server. The Workbench dashboard is local-only and does not replace your production Pulse authorization.
In the local environment, the dashboard also has a state picker. /pulse?scenario=warning, for example, renders the real cards against SDK HTTP fixtures without changing any Oh Dear monitors. It includes healthy, warning, failing, empty, unconfigured, API-error, loading, disabled, snoozed, pending, unsupported, unavailable, missing-expiry and individual application-status examples. The loading example freezes the cards' actual lazy-loading placeholders for inspection. Return to /pulse to use live API data. Preview middleware and fixtures are excluded from the distributed package.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Freek Van der Herten
- Laravel Shift, for the Laravel 13 compatibility work in #23
- Dependabot, for the workflow updates in #19, #25, and #26
- All Contributors
License
The MIT License (MIT). Please see License File for more information.



