Download the PHP package sarfraznawaz2005/servermonitor without Composer

On this page you can find all versions of the php package sarfraznawaz2005/servermonitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package servermonitor

Latest Version on Packagist Total Downloads

Laravel Server Monitor

Laravel package to periodically monitor the health of your server and application. It ships with common checks out of the box and allows you to add your own custom checks too. The packages comes with both console and web interfaces.

Requirements

Installation


Now publish package's config file by running below command:

See config/server-monitor.php config file to customize checks, notifications and more.

Built-in Checks

The package comes with following checks out of the box. Checks can be divided into three categories:

Server Checks

Common Checks

Environment Checks (Development)

Environment Checks (Production)

Commands

The package comes with two commands:

Here is how it looks:

Screen 3

Both commands take optional argument. If specified, it will run check or return status of only specified check:

Scheduling

You can use servermonitor:check command to check status of enabled checks periodically instead of running this command manually each time.

Schedule it in Laravel's console kernel file accordingly:

Web Interface

The package provides built-in web interface. You can customize the route of web interface in config file 'route' => 'servermonitor'. Once done, you can visit Web Interface at url http://yourapp.com/servermonitor. Replace servermonitor with route you used.

Other than commands, you can also use Web Interface to run new checks process for all or individual checks.

Screen 1

Screen 2

Disabling Web Interface

If you would like to disable Web Interface, you can set web_interface_enabled to false and now hitting web interface route would result in 404.

Dashboard Refresh Interval

You can refresh the dashboard page by changing the server-monitor.dashboard_refresh_interval value in the config/server-monitor.php file.The value you give must be in seconds and if you don't have this config key(eg: old users), no worries, the default value will be 60 seconds.

Running/Getting Checks Programmatically

If you still would like to show status of various checks in your view in your own way, you can get status of all checks programmatically like so:

You can also run check(s) programmatically ($sm->runChecks()), see available methods in file: vendor/Sarfraznawaz2005/ServerMonitor/src/ServerMonitor.php

Running Checks for Web Only

If for some reasons, you want to run some checks manually and via Web Interface only, you can specify web_only option for such checks like this:

``

Now above check will not be run via console when servermonitor:check is run. However this check will be performed when you run all checks via Web Interface.

Customization

See config/server-monitor.php file for all checks. Note that some checks are commented intentionally, you can un-comment them if you need to use them.

You can also customize check name that displays up in console/web interface by passing name config value like this:

``

If you don't pass name key, it will be made out of class name, in above case App Key Set by automatically converting "PascalCase" to "Pascal Case" from class name.

Some checks may require additional config options such as:

``

For above check to work, you must provide binary_path value for example.

Alert Configuration

You can get notified when a check fails. Package supports these alert/notification channels:

Update your notification options under notifications option in config file.

Note that you can also customize all notification options for individual checks too. Let's say you have specified mail as default channel for your alerts but for following check only, it will be alerted via log channel and a different alert title:

``

You can also disable alerts for individual checks like so:

``

Creating Your Own Custom Checks

You can create custom checks, by implementing the [Sarfraznawaz2005\ServerMonitor\Checks\Check] interface and adding the class to the config file. Example:

``

Issues

Please let's know if you notice any issues, we recommend PRs for existing or new checks.

No Tests ?

We welcome PRs for test cases.

Credits

License

Please see the license file for more information.


All versions of servermonitor with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0
league/flysystem Version ^3.12
nesbot/carbon Version ^2.66|^3.0
composer/semver Version ^3.3
alek13/slack Version ^2.2
geerlingguy/ping Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sarfraznawaz2005/servermonitor contains the following files

Loading the files please wait ....