dev-master
9999999-devhealth checker for Flow framework and Neos CMS
MIT
The Requires
health checker for Flow framework and Neos CMS
Package in development, not ready for production, (*1)
In your Settings.yaml
:, (*2)
Ttree: Health: presets: default: checks: database: class: Ttree\Health\Check\DatabaseCheck elasticsearch: class: Ttree\Health\Check\ElasticSearchCheck newsletterSender: class: Ttree\Health\Check\NewsletterSenderCheck
Then you can create your routing configuration, in your Routes.yaml
:, (*3)
- name: 'health - monitoring endpoint' uriPattern: 'health' defaults: '@package': 'Ttree.Health' '@controller': 'Monitoring' '@action': 'index' '@format': 'json' 'preset': 'default' appendExceedingArguments: true httpMethods: [GET]
The response should be something like this:, (*4)
{ "endpoint": "default", "success": { "count": 1, "message": { "database": { "status": "Success", "message": "Database access works" } } }, "warnings": { "count": 1, "message": { "elasticsearch": { "status": "Warning", "message": "ElasticSearchCheck is not in green state" } } }, "errors": { "count": 1, "message": { "newsletterSender": { "status": "Error", "message": "Newsletter Sender is down" } } } }
The response status is 200
if there is not errors and warnings., (*5)
Your custom check must implement Ttree\Health\Check\CheckInterface
. The response of the run
method must return an
instance of Ttree\Health\Result\ResultInterface
. You can use the builtin ErrorResult
, WarningResult
and SuccessResult
., (*6)
Currently the provided check contains "dummy" code. Real implementation will be done later when the architecture of the package is finished., (*7)
TODO, (*8)
The development of this package is sponsored by ttree (https://ttree.ch)., (*9)
health checker for Flow framework and Neos CMS
MIT