Download the PHP package mindtwo/laravel-monitoring without Composer
On this page you can find all versions of the php package mindtwo/laravel-monitoring. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mindtwo/laravel-monitoring
More information about mindtwo/laravel-monitoring
Files in mindtwo/laravel-monitoring
Package laravel-monitoring
Short Description Laravel plugin of the mindtwo monitoring suite: framework-specific collectors, a scheduled push job and a signed pull endpoint on top of mindtwo/base-monitoring.
License MIT
Homepage https://github.com/mindtwo/laravel-monitoring
Informations about the package laravel-monitoring
mindtwo/laravel-monitoring
Laravel plugin of the mindtwo monitoring suite. On top of
mindtwo/base-monitoring — which collects OS,
web server, database, Node.js, system stats, Composer/npm packages, security audits, licenses
and git status — this package adds:
- Laravel collectors — framework version, operational environment (debug flag, maintenance mode, drivers, optimization caches) and the live database server version from your actual connection.
- Push — a scheduled
monitoring:pushrun delivering signed snapshots to the central endpoint. - Pull — a throttled, HMAC-authenticated
GET /api/m2-monitoringendpoint with optional IP allow-listing and short-lived snapshot caching. - DX tooling —
monitoring:show,monitoring:push --dry-run,monitoring:collectors,php artisan aboutintegration and a facade for custom data.
Installation
Set your credentials (issued by the monitoring dashboard) in .env:
That's it. The service provider auto-registers, the pull endpoint goes live at
/api/m2-monitoring, and a push is scheduled daily at 03:00 — provided your
scheduler is running.
Publish the config when you need to customize more:
Configuration
Everything is configurable via .env without publishing:
| Variable | Default | Purpose |
|---|---|---|
MONITORING_ENABLED |
true |
Master switch for route + schedule |
MONITORING_PROJECT_KEY |
– | Project key from the dashboard |
MONITORING_SECRET |
– | Shared secret (never transmitted) |
MONITORING_ENDPOINT |
https://monitoring.mindtwo.com/api/monitoring |
Push target |
MONITORING_ENVIRONMENT |
app()->environment() |
Reported environment |
MONITORING_TIMEOUT |
15 |
Push timeout (seconds) |
MONITORING_ROUTE_ENABLED |
true |
Expose the pull endpoint |
MONITORING_ROUTE_PATH |
api/m2-monitoring |
Pull endpoint path |
MONITORING_ROUTE_CACHE |
300 |
Pull snapshot cache (seconds, 0 disables) |
MONITORING_RATE_LIMIT |
10 |
Pull requests per minute per IP |
MONITORING_SIGNATURE_TOLERANCE |
300 |
Signature timestamp window (seconds) |
MONITORING_IP_ALLOW_LIST |
– | Comma-separated IPs / CIDR ranges |
MONITORING_SCHEDULE_ENABLED |
true |
Register the scheduled push |
MONITORING_SCHEDULE_CRON |
0 3 * * * |
Push cron expression |
MONITORING_SCHEDULE_TIMEZONE |
app timezone | Cron timezone |
Artisan commands
monitoring:show example:
The pull endpoint
GET /api/m2-monitoring returns the current snapshot as JSON. Every request must be signed:
The body of a pull GET is empty, so the signed string is simply "<timestamp>.". Example:
Defense layers, in request order:
- Rate limiting — 10 requests/minute per IP by default (
throttle:monitoring). - IP allow-list (optional) — plain IPs and CIDR ranges, IPv4 + IPv6. Behind a load balancer, configure trusted proxies so the client IP resolves correctly.
- Signature verification — constant-time HMAC comparison plus a timestamp tolerance window
against replays. Unconfigured credentials answer
503and never expose data. - Snapshot caching — responses are cached for 5 minutes by default, keeping repeated polls from re-running expensive audit collectors.
Customizing
Choose or add collectors
The collectors config array is the single source of truth — reorder, remove, or add entries.
Every class is resolved through the container:
Attach custom data
Closures are evaluated lazily and fault-isolated — a throwing provider records an error under its key instead of breaking the snapshot.
Replace the transport
Bind your own Mindtwo\Monitoring\Contracts\Transport implementation to ship snapshots
anywhere else (S3, a queue, a different protocol):
How pushing works
monitoring:push is registered on the scheduler (daily at 03:00 by default) with
withoutOverlapping(), onOneServer() and runInBackground(). The command builds a snapshot
— every collector individually fault-isolated — signs the JSON payload and POSTs it through
Laravel's HTTP client, so Http::fake() sees it in your tests.
Delivery failures exit non-zero with a clear message; they never throw.
Testing your integration
Development
Security
If you discover a security issue, please email [email protected] instead of opening a public issue.
License
The MIT License (MIT). See LICENSE.md.
All versions of laravel-monitoring with dependencies
composer-runtime-api Version ^2.0
guzzlehttp/guzzle Version ^7.4
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
mindtwo/base-monitoring Version ^1.0