ohdearapp/ohdear-php-sdk
Official PHP SDK for the Oh Dear monitoring API. Built on Saloon v4, it provides typed DTOs and convenient methods to manage monitors and more. Supports API token auth, configurable timeouts, and clear exceptions for validation and API errors.
Monitoring Infrastructure as Code (IaC): Enable programmatic creation, management, and deletion of uptime monitors (HTTP, ping, TCP) directly from PHP applications (e.g., CI/CD pipelines, deployment scripts, or internal tools). Aligns with DevOps practices for infrastructure automation.
Status Page Integration: Build dynamic status pages for internal/external stakeholders by programmatically syncing monitor health with real-time updates. Supports incident management workflows (e.g., auto-generating maintenance windows or posting updates during outages).
Observability Platform Expansion: Integrate Oh Dear’s monitoring data into existing dashboards (e.g., Grafana, custom PHP apps) for unified visibility. Useful for teams already using Oh Dear but needing deeper programmatic access to metrics (e.g., certificate health, uptime trends).
Cost Optimization: Replace manual monitor setup with automated, conditional creation (e.g., spin up monitors for staging environments during deployments, then delete them post-deployment). Reduces unnecessary monitoring costs.
Custom Alerting Logic:
Implement bespoke alerting rules beyond Oh Dear’s native thresholds (e.g., trigger Slack notifications only for specific monitor types or during business hours). Example: Use the SDK to fetch CheckSummary and route alerts via PHP services.
Compliance/Validation Workflows:
Automate checks for compliance-critical items (e.g., SSL certificate validity, broken links) in pre-deployment hooks. Example: Fail a GitHub Actions workflow if certificateHealth()->isHealthy() returns false.
Roadmap:
Avoid if:
Consider if:
"This SDK lets us automate and extend Oh Dear’s monitoring capabilities directly from our PHP stack—reducing manual work, improving reliability, and enabling smarter incident responses. For example:
"The Oh Dear PHP SDK provides a clean, Saloon-powered interface to manage monitors, status pages, and checks programmatically. Key benefits:
CheckSummary, CertificateHealth) reduce runtime bugs."This SDK bridges Oh Dear’s monitoring with our existing workflows. Highlights:
How can I help you explore Laravel packages today?