Download the PHP package makinacorpus/monitoring-bundle without Composer

On this page you can find all versions of the php package makinacorpus/monitoring-bundle. 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 monitoring-bundle

Simple monitoring tooling for Symfony

This API provides simple and easy to use interfaces for building supervision probes that you can run to check sanity of your application.

It provides a Symfony >= 4.4 compatible bundle for registering your custom probes into a Symfony application.

Features:

Installation

Install it using composer:

Symfony bundle

Installation

Then register the bundle in your app/bundles.php:

Configuration

Optionnaly copy the src/Bridge/Symfony/Resources/config/packages/monitoring.yaml file into your app config/packages/ folder.

Register HTTP status endpoint (recommended)

Status endpoint will always return plain text responses, Nagios parser compatible, which means that almost every open source supervision tool will understand those status reports.

A custom route loader will generate one route per probe. In order to register those routes, add into your config/routes.yaml the following code:

For those routes to respond, you need to generate an access token for users:

Follow the instructions on screen, it will display the new token and new probes URL: you can copy/paste the newly generated token into your environment variables:

Note that you can run the command as many times as you wish in order to be able to copy/paste probes URLs, the command will never modify your application configuration.

If your site is protected by a firewall, you may add the following into config/packages/security.yaml:

Register admin report screen (optional)

A basic HTML report controller and template is provided, you may add it into your config/routes.yaml configuration file:

Please note that it is not security checked, you must manually configure your firewall to protect it.

Building your own probes and reports

Build a simple probe

Implement the \MakinaCorpus\Monitoring\Probe interface.

Build a simple report generator

Implement the \MakinaCorpus\Monitoring\InfoCollector interface:

Combining both

Just implement both interfaces, they are compatible and won't conflict.

Notes about reports and tags

Each InfoCollector implementation has a getTags(): iterable method, each tag is a tag name string. Beware that you probably want to group associated reports altogether for building your UI.

Registering them into Symfony

For any probe or info collector class, register them into your container and add the monitoring_plugin tag:

Cron script

If you don't have a supervision tool to parse status endpoint, you can use a simple check command run by a cron to perform status check.

Configuring your cron

If you don't have any external software to read your probes, you can plug-in the default (very naive) version of monitoring daemon into your crontab:

Pluging reactions to errors

Per default, the check command won't do anything, you must manually write handlers for reacting upon broken probes.

Fetching nagios-compatible result using the command line

This will output a Nagios parser compatible text.


All versions of monitoring-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
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 makinacorpus/monitoring-bundle contains the following files

Loading the files please wait ....