jmonitor / jmonitor-bundle
Integration of jmonitor monitoring library in symfony.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.1
- jmonitor/collector: ^1.0
- nyholm/psr7: ^1.8
- symfony/console: ^6.4|^7.0
- symfony/framework-bundle: ^6.4|^7.0
- symfony/http-client: ^6.4|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.86
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
Suggests
- symfony/scheduler: If you want the bundle to automatically collect metrics at regular intervals.
This package is auto-updated.
Last update: 2025-08-22 15:45:06 UTC
README
Integration of the jmonitor/collector, library into Symfony.
Jmonitor.io is a simple monitoring sass for PHP applications and web servers that provides insights and alerting from various sources like MySQL, Redis, Apache, Nginx...
This bundle uses Symfony Scheduler to send metrics to Jmonitor.io every 15 seconds.
You can still use it without it, but you will need to set up a cron by yourself.
Requirements
- PHP 8.1 for the bundle. You can still use Jmonitor with PHP 7.4 with the standalone library.
- Symfony 6.4 or higher.
- [recommended] Symfony Scheduler: https://symfony.com/doc/current/scheduler.html
Installation
composer require jmonitor/jmonitor-bundle
Configuration
Create a project in jmonitor.io and get your API key.
.env
JMONITOR_API_KEY=your_api_key
config/packages/jmonitor.yaml
jmonitor: enabled: true project_api_key: '%env(JMONITOR_API_KEY)%' schedule: 'default' # Remove it if you do not want to use symfony scheduler. # Enable the collectors you want to use (remove the unused ones). collectors: system: ~ apache: server_status_url: 'https://localhost/server-status' # for more informations, see https://github.com/jmonitor/collector?tab=readme-ov-file#apache mysql: db_name: 'your_db_name' php: ~ redis: # you can use either DSN or a service name (adapter). # Remove the unused one. dsn: '%env(SOME_REDIS_DSN)%' adapter: 'some_redis_service_name' frankenphp: endpoint: 'http://localhost:2019/metrics' # see https://frankenphp.dev/docs/metrics/ and/or https://caddyserver.com/docs/metrics caddy: endpoint: 'http://localhost:2019/metrics' # see https://caddyserver.com/docs/metrics
You can customize the HTTP client used by Jmonitor.
jmonitor: #... http_client: 'some_http_client'