wy / neos-oh-dear
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (v1.1.1) of this package.
Track your app vitals with OhDear.app
Package info
github.com/wysiwyg-software-design/neos-oh-dear
Type:neos-plugin
pkg:composer/wy/neos-oh-dear
v1.1.1
2023-05-15 10:04 UTC
Requires
- php: >=7.4
- neos/flow: *
- symfony/process: *
README
Caution
This repository is deprecated and will be removed in September 2025
Neos Oh Dear
This package makes it easy to monitor your Neos application vitals and outputs a JSON for Oh Dear.
Installation
You can easily install this plugin via composer
composer require wy/neos-oh-dear
Set Up
- Create a file in the web root folder, e.g.
health.php(see example below)- Require
../Packages/Plugins/Wysiwyg.OhDear/autoload.php - Initialize the
\Wysiwyg\OhDear\Applicationclass with the Composer autoloader (see below for an example) - Initialize your checks with the correct configuration values
- Process the steps
- Require
- Configure your Oh Dear secret at the following config path in Neos:
Wysiwyg.OhDear.healthSecret(only for production) - Open the file in your web browser, the result should be a JSON string (see example below)
Available Checks
Example File
<?php use \Wysiwyg\OhDear\Checks; $composerAutoloader = require_once '../Packages/Plugins/Wysiwyg.OhDear/autoload.php'; $app = new \Wysiwyg\OhDear\Application($composerAutoloader); /** @var array<int, \Wysiwyg\OhDear\Checks\Check> $checks */ $checks = [ new Checks\DiskSpaceCheck(), new Checks\CpuLoadCheck(), new Checks\DatabaseCheck( 'mysql', $app->getNeosConfig('Neos.Flow.persistence.backendOptions.host'), $app->getNeosConfig('Neos.Flow.persistence.backendOptions.user'), $app->getNeosConfig('Neos.Flow.persistence.backendOptions.password'), $app->getNeosConfig('Neos.Flow.persistence.backendOptions.dbname') ), new Checks\RedisCheck( $app->getNeosConfig('Neos_Fusion_Content.backendOptions.hostname', 'Caches'), $app->getNeosConfig('Neos_Fusion_Content.backendOptions.password', 'Caches'), $app->getNeosConfig('Neos_Fusion_Content.backendOptions.database', 'Caches'), (int) $app->getNeosConfig('Neos_Fusion_Content.backendOptions.port', 'Caches') ), new Checks\SwiftSmtpCheck( $app->getNeosConfig('Neos.SwiftMailer.transport.options.host'), $app->getNeosConfig('Neos.SwiftMailer.transport.options.encryption'), $app->getNeosConfig('Neos.SwiftMailer.transport.options.port'), $app->getNeosConfig('Neos.SwiftMailer.transport.options.user'), $app->getNeosConfig('Neos.SwiftMailer.transport.options.password'), $app->getNeosConfig('Neos.SwiftMailer.transport.options.streamOptions'), ), ]; $app->process($checks);
JSON Output example
{
"finishedAt": 1639735170,
"checkResults": [
{
"name": "Disk space",
"label": "",
"notificationMessage": "The disk is almost full (90% used).",
"shortSummary": "90%",
"status": "warning",
"meta": {
"disk_space_used_percentage": 90
}
},
{
"name": "CPU Load",
"label": "",
"notificationMessage": "",
"shortSummary": "3.31982421875 2.98046875 2.98046875",
"status": "ok",
"meta": {
"lastMinute": 3.31982421875,
"last5Minutes": 2.98046875,
"last15Minutes": 2.98046875
}
},
{
"name": "Database Connection",
"label": "",
"notificationMessage": "",
"shortSummary": "Conntected",
"status": "ok",
"meta": []
}
]
}