webhubworks/craft-ohdear
Composer 安装命令:
composer require webhubworks/craft-ohdear
包简介
Integrate the Oh Dear monitoring service into Craft CMS.
README 文档
README
Integrate Oh Dear into Craft CMS.
Requirements
This plugin requires Craft CMS 5.0.0 or later and PHP 8.2 or later.
You'll also have to provide an Oh Dear API key.
🙏 You can create an Oh Dear account using our affiliate link: Oh Dear We will offer you a free license key for Craft Oh Dear if you sign up using our affiliate link. Just send us a message.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin.
composer require webhubworks/craft-ohdear -
Install and enable the plugin:
./craft plugin/install ohdear && ./craft plugin/enable ohdearOR: In the Control Panel, go to Settings → Plugins and click the “Install” button for Oh Dear.
Oh Dear Overview
Craft Oh Dear provides deep integration into Craft and saves developer's time by empowering editors.
With Oh Dear you don‘t just monitor your homepage but your entire website. Oh Dear monitors uptime, checks your SSL certificates, detects broken links and mixed content. Craft Oh Dear integrates all this nicely into the Control Panel.
To learn more about the features visit the plugin store page.
Configuring Oh Dear
Go to the settings page and paste your Oh Dear API key. (You can create a token on Oh Dears's API token page.) You can choose from the sites of all teams that your personal Oh Dear account belongs to.
Currently there is no multi-site support. You can only connect to a single Oh Dear site from one Craft installation. Multi-site support is on our Roadmap. Let us know if you desperately need it.
Caching expensive health checks via cron
Check::cve() and Check::abandonedPackages() spawn one or more composer subprocesses every time the health-check endpoint is hit. With several outstanding advisories this can easily push the endpoint past Oh Dear's response-time budget.
Opt into cron-refreshed caching in config/ohdear.php:
use webhubworks\ohdear\health\checks\Check; return [ 'healthChecks' => [ Check::cve()->cachedViaCron(60 * 60 * 12), Check::abandonedPackages()->cachedViaCron(60 * 60 * 12), // … ], ];
Then schedule the refresh command on cron, more frequently than the staleness threshold you configured:
*/30 * * * * cd /path/to/site && php craft ohdear/health-check/refresh >/dev/null 2>&1
While caching is enabled the health-check endpoint reads from cache only. Until the first refresh has run, the check returns STATUS_WARNING with a "Not yet computed" message. If the cached result is older than the staleness threshold, the previous result is still returned but its status is downgraded to STATUS_WARNING with staleSince in meta. With caching disabled (default), behavior is unchanged.
Oh Dear Roadmap
- Application Health Checks for site security
- More Checks like Sitemap, DNS, Scheduled Tasks etc.
Questions and answers
Why not just use Oh Dear‘s dashboard?
As an Oh Dear customer you can be a member of many teams each with their own monitored websites. It is tailored to you as a developer. With Craft Oh Dear you‘ll bring all relevant features to your Craft editors. Empower them to find and fix broken links and mixed content, check app and certificate health, review performance metrics and analyse uptime.
Does Craft Oh Dear detect 404s?
Oh Dear crawls your website to find broken links that refer to external or internal pages from the point of view of a user that is on your site. Thus it cannot detect 404 errors for users that arrive from outside to your website. For this purpose you may find several other Craft plugins or services that detect 404s to your site when they occure.
What's Mixed Content?
Take a look at this good explanation on MDN.
Is this an official Oh Dear plugin?
This plugin is independent from Oh Dear. You can see all available 3rd party integrations in Oh Dear's docs.
Where is version 3?
Starting at version 4 the version number will correspond to the Craft version that the plugin runs on. Craft Oh Dear 2 requires Craft 3 and Craft Oh Dear 3 does not exist. New features will only be available in Craft Oh Dear 5 which requires Craft 5.
Brought to you by webhub
webhubworks/craft-ohdear 适用场景与选型建议
webhubworks/craft-ohdear 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.09k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2020 年 05 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「test」 「cms」 「Craft」 「craftcms」 「craft-plugin」 「oh dear」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 webhubworks/craft-ohdear 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webhubworks/craft-ohdear 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 webhubworks/craft-ohdear 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Expand, collapse, change the status of, or delete multiple blocks in a Matrix field simultaneously.
Testing Suite For Lumen like Laravel does.
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
Specification-oriented BDD helpers for PHPUnit
统计信息
- 总下载量: 3.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2020-05-25
