ohdearapp/ohdear-php-sdk
Official PHP SDK for the Oh Dear API, built on Saloon v4. Manage monitors, retrieve user info, and handle API responses with typed DTOs. Supports API token authentication, configurable timeouts, and clear validation and error exceptions. Simplifies integrating Oh Dear monitoring into PHP application...
CheckResult::isUp() / isDown() / isWarning()), which is exactly the shape needed for a customer-facing "system status" widget or an internal ops dashboard. This is a scope decision: do we show status in-app, or link out to the hosted status page?startMaintenancePeriod / stopMaintenancePeriod / createMaintenancePeriod make it feasible to suppress alert noise automatically around deploys and migrations — a concrete reduction in on-call toil that can be sold internally as an SLO/reliability initiative.createMonitor plus addStatusPageMonitors supports provisioning a new client site with monitoring and a status page in one workflow — relevant if onboarding speed or "monitoring included" is a packaging differentiator.certificateHealth() with getFailedChecks() and getValidUntil() supports a "certificates expiring in 30 days" digest — a cheap way to close a recurring, embarrassing outage class.Adopt when all of the following hold:
Look elsewhere when:
To executives: This is a free, MIT-licensed, vendor-official library that lets our own systems talk to our website monitoring service. The strategic value is not the code — it is that it converts a manual, human-in-the-loop process (someone notices a site is down, someone posts a status update, someone remembers to pause alerts during a deploy) into automated workflow. Expected outcomes: fewer alert-fatigue interruptions during planned work, faster and more consistent incident communication, and uptime/certificate data we can put in front of customers without building a reporting pipeline. Cost is engineering days, not licence fees, and there is no lock-in beyond the monitoring subscription we already pay for — the fallback is calling the same API directly.
To engineering: It is a thin, typed SDK over the Oh Dear API built on Saloon v4 — DTOs for monitors, checks, status pages, maintenance periods and uptime metrics, plus enums for check results so we are not string-matching 'failed'/'succeeded' in our own code. Errors are explicit (ValidationException with a parseable errors() array, OhDearException for the rest) and timeouts are configurable, so it behaves predictably in queue jobs. Integration cost is roughly a composer require plus a token in config — there is no service provider, so wiring is trivial but also our responsibility. Honest caveats: low public adoption, so treat upstream changes as "vendor may move without community pressure" — pin the version and keep our usage behind a small internal adapter so the SDK is swappable for raw HTTP calls. Also worth confirming the specific endpoints we need are covered before we build on it; the README is thorough but the API surface is the source of truth.
How can I help you explore Laravel packages today?