Git Product home page Git Product logo

meter's Introduction

Software License Latest Version on Packagist Total Downloads

Laravel Meter

Laravel Meter monitors application performance for different things such as requests, commands, queries, events, etc and presents results in tables/charts. Think of it like Laravel Telescope but for performance monitoring.

Requirements

  • PHP >= 7.3
  • Laravel 5.5+ | 6

Monitors

  • Requests
  • Queries
  • Commands
  • Events
  • Schedule
  • CPU Load
  • Disk Space
  • Server Memory
  • HTTP Connections

Screenshot

Main Window

Installation

Install via composer

composer require sarfraznawaz2005/meter

Publish package's config file by running below command:

php artisan vendor:publish --provider="Sarfraznawaz2005\Meter\MeterServiceProvider"

It should publish config/meter.php config file and migration file.

Now run php artisan migrate command to create meter_entries database table.

Usage

Enable Meter in config/meter.php and setup any other options as needed. Meter UI will be visible at path config you set.

By default Meter monitors:

  • Requests
  • Queries
  • Commands
  • Events
  • Schedule

To monitor server stuff:

  • CPU Load
  • Disk Space
  • Server Memory
  • HTTP Connections

You should use meter:servermonitor command. Schedule it in Laravel's console kernel file accordingly:

// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
    $schedule->command('meter:servermonitor')->hourly(); // or daily
}

Authentication

You can use username and password config options to setup basic HTTP authentication for Meter interface to be accessed. Once setup, user should provide correct username and password to access Meter page(s).

Alternatively, you can use middleware config option to apply your own auth middleware, etc

Ignoring Things

You can use ignore_paths and ignore_commands config options to ignore desired pages or commands from being monitored by Meter.

Data Pruning

You need to periodically remove meter data otherwise your database will turn big quickly. To prune meter data, you can setup prune command in Kernel file:

$schedule->command('meter:prune')->daily();
// or
$schedule->command('meter:prune --days=7')->daily();

Contributing

PRs are welcome. Thanks

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

Please see the license file for more information.

meter's People

Contributors

sarfraznawaz2005 avatar sarfrazonsupport avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.