mteu / typo3-monitoring
Exposes health status information of selected components in your TYPO3 instance to be integrated in external monitoring
Package info
github.com/mteu/typo3-monitoring
Type:typo3-cms-extension
pkg:composer/mteu/typo3-monitoring
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
- mteu/typo3-typed-extconf: ^1.3
- psr/http-client: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
- symfony/console: ^7.3
- symfony/dependency-injection: ^7.3
- typo3/cms-backend: ^13.4.23 || ^14.3.0
- typo3/cms-core: ^13.4.23 || ^14.3.0
- typo3fluid/fluid: ^2.15.0 || ^4.3 || ^5.3
Requires (Dev)
- composer/class-map-generator: ^1.1
- eliashaeussler/version-bumper: ^3.3
- ergebnis/composer-normalize: ^2.47
- phpunit/phpcov: ^11.0.0 || ^12.0.0
- phpunit/phpunit: ^12.1 || ^13.1
- roave/security-advisories: dev-latest
- typo3/testing-framework: ^9.2
- dev-main
- 0.5.0
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- dev-renovate/actions-checkout-6.x
- dev-renovate/qltysh-qlty-action-2.x
- dev-renovate/major-github-artifact-actions
- dev-renovate/ramsey-composer-install-4.x
- dev-renovate/softprops-action-gh-release-3.x
- dev-renovate/actions-checkout-4.x
- dev-renovate/pin-dependencies
- dev-task/guard-tokenauthorizor-against-empty-secret
- dev-task/add-basic-command-test
- dev-renovate/patch-symfony
- dev-task/language-washing
- dev-task/add-authorizer-tests
- dev-renovate/phpunit-phpunit-12.5.x-lockfile
- dev-task/reject-unsupported-methods
- dev-release/0.4.4
- dev-bugfix/fix-l10n
- dev-renovate/major-symfony
- dev-task/flush-cache-by-post
This package is auto-updated.
Last update: 2026-05-14 21:11:38 UTC
README
TYPO3 Monitoring
This packages provides the TYPO3 CMS Extension EXT:monitoring which extends the CMS with a monitoring system that
gives an insight into the health state of custom TYPO3 components through an API endpoint and a CLI command, e.g. for
post-deployment checks.
Warning
This package is in testing. Be cautious when using EXT:monitoring in production.
🦊 TYPO3 Support
| TYPO3 v12 | TYPO3 v13 | TYPO3 v14 | |
|---|---|---|---|
| =< v0.4.x | ✅ | ✅ | ❌ |
| v0.5.x | ❌ | ✅ | ✅ |
🚀 Features
- Extensible monitoring system with automatic service discovery (using DI) for custom authorization and monitoring checks.
- Supports caching for expensive monitoring operations
- Delivers health reports in three ways:
- Structured JSON responses for the overall health status
- Command-line interface for running monitoring checks
- Backend Module
🔥 Quick Start
Installation
Install via Composer:
composer require mteu/typo3-monitoring
Configuration
# config/system/settings.php <?php return [ // .. 'EXTENSIONS' => [ 'monitoring' => [ 'api' => [ 'endpoint' => '/monitor/health', 'enforceHttps' => false, ], 'authorizer' => [ 'mteu\Monitoring\Authorization\TokenAuthorizer' => [ 'enabled' => true, 'secret' => 'your-secure-secret', 'authHeaderName' => 'X-TYPO3-MONITORING-AUTH', 'priority' => 10, ], 'mteu\Monitoring\Authorization\AdminUserAuthorizer' => [ 'enabled' => true, 'priority' => -10, ], ], ], ], // .. ];
Endpoint
Access your monitoring endpoint while authenticated as backend user with the role of Admin or System Maintainer:
GET https://<your-site>/monitor/health
The monitoring endpoint returns JSON with the following structure:
{
"isHealthy": true,
"services": {
"service_one": "healthy",
"service_two": "healthy",
"service_three": "healthy"
}
}
isHealthy: Overall health status (boolean)services: Object with individual service statuses ("healthy" or "unhealthy")
HTTP status codes:
200All services healthy401Unauthorized access403Unsupported protocol (only whenapi.enforceHttpsis enabled)503One or more services unhealthy
Authentication
This extension ships two authentication methods natively:
Admin User Authentication
Access the endpoint while logged in as a TYPO3 backend administrator.
Token-based Authentication
Add the configured auth header (default: X-TYPO3-MONITORING-AUTH) with an HMAC signature:
curl -s -H "X-TYPO3-MONITORING-AUTH: <auth-token>" \ https://<your-site>/monitor/health | jq '.'
Token Generation: The HMAC token is generated using TYPO3's HashService with the endpoint path and your configured secret (which acts more like a salt).
use TYPO3\CMS\Core\Crypto\HashService; final readonly class TokenGenerator { public function __construct( private HashService $hashService, ) {} public function generate(string $endpoint, string $secret): string { return $this->hashService->hmac($endpoint, $secret); } } // $token = $tokenGenerator->generate('/monitor/health', 'your-secure-secret');
🧑💻 Development
Creating Custom Providers
Implement the MonitoringProvider interface:
<?php use mteu\Monitoring\Provider\MonitoringProvider; use mteu\Monitoring\Result\MonitoringResult; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; #[AutoconfigureTag(tag: 'monitoring.provider')] final class MyMonitoringProvider implements MonitoringProvider { public function getName(): string { return 'MyService'; } public function getDescription(): string { return 'Monitors my custom service'; } public function isActive(): bool { // conditional logic or just true return true; } public function execute(): MonitoringResult { // Your monitoring logic here return new MonitoringResult( $this->getName(), true, ); } }
Creating Custom Authorizers
Implement the Authorizer interface:
<?php use mteu\Monitoring\Authorization\Authorizer; use Psr\Http\Message\ServerRequestInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; #[AutoconfigureTag(tag: 'monitoring.authorizer')] final class MyAuthorizer implements Authorizer { public function isAuthorized(ServerRequestInterface $request): bool { // Your authorization logic here return true; } public static function getPriority(): int { return 100; // Higher priority = checked first } }
🤝 Contributing
Contributions are very welcome! Please have a look at the Contribution Guide. It lays out the workflow of submitting new features or bugfixes.
📙 Documentation
Please have a look at the extension documentation. It provides a detailed look into the possibilities you have in extending and customizing this extension for your specific TYPO3 components.
🔒 Security
Please refer to the Security Policy if you discover a security vulnerability in this extension. Be warned, though. I cannot afford bounty. This is a private project.
💛 Acknowledgements
This extension is inspired by cpsit/monitoring and its generic approach to offer an extensible provider
interface. I've transformed and extended the underlying concept into a TYPO3 specific implementation.
⭐ License
This extension is licensed under the GPL-2.0-or-later license.
💬 Support
For issues and feature requests, please use the GitHub issue tracker.