Larametrics – Self-hosted Metrics and Notifications
Published on by Paul Redmond
Larametrics is an open-source self-hosted metrics and notifications platform for Laravel apps created by Andrew Schmelyun. It’s simple to get started and only takes a few minutes to get started. The official Getting Started documentation describes Larametrics as follows:
What exactly does that mean? Think of it as a simple version of sentry.io or rollbar.com. Consisting of a series of watchers keeping an eye on model changes, log entries, and route requests, Larametrics alerts you through email or Slack when one of your notification triggers is met.
The documentation describes a few notification examples:
- Email me when a notice or info message is logged
- Alert me through Slack and email when an error is logged
- Let me know when an Admin model is created or deleted
- Tell me when someone visits the /auth/login route
In addition to the metrics and notifications, the package provides a dashboard:
You can set up the dashboard by defining the following routes in your config/web.php
file:
Route::group(['middleware' => 'auth', 'prefix' => 'admin'], function() { \Aschmelyun\Larametrics\Larametrics::routes();});
Larametrics is compatible with >= Laravel 5.2 and PHP 5.6 at the time of writing. You can learn more about Larametrics with the Larametrics documentation. The source code is open-source and available on GitHub.