Download the PHP package brightmachine/scrutiny without Composer

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

Scrutiny

Scrutiny helps your Laravel 8 project ensure that its current server environment is configured and running as planned.

Latest Stable Version Total Downloads License

Problem

Have you ever been in the situation where you've moved servers and forgotten to:

  1. Get your queue running?
  2. Add the cron job to run your schedule?
  3. Install an obscure program that your reporting uses once a month?
  4. Enable a PHP extension that you need for an API?

This is the scenario Scrutiny was built to address – use the availability monitor you already use (like Oh Dear or Pingdom) to also monitor other important aspects of your environment.

This means your availability monitor notifies you of any problems with your server environment setup instead of waiting for your clients or customers to tell you something is wrong.

Installation

To install through composer, add the following to your composer.json file:

Then run composer install from the terminal.

Quick Installation

The installation instructions can be simplified using the following:

composer require "brightmachine/scrutiny=~2.0"

You are all setup – next step it to add your probes!

How it works

  1. In AppServiceProvider::boot(), configure the probes to check for all the things your environment needs in order to run
  2. Set up an uptime check in Oh Dear or Pingdom to alert you if any of the probes fail to pass

How to configure the different probes


What probes are available

All probes are added through \Scrutiny\ProbeManager and calls can be chained:

The following probes are available via \Scrutiny\ProbeManager::configure():

availableDiskSpace()

Ensure that you always have space available.

It works by finding the disk related to a given folder and checking its usage.

callback()

If your use-case isn't supported out-of-the-box you can write your own custom probe.

When a probe is checked, 3 outcomes are possible:

  1. Skipped – if a \Scrutiny\ProbeSkippedException exception is thrown
  2. Failed – if any other exception is thrown
  3. Passed – if no exception is thrown

connectsToDatabase()

Check that you're able to connect to one of your databases configured on config/database.php.

connectsToHttp()

This probe checks that a given URL will return a 2xx response.

NB: Redirects will not be followed – only the first response will be considered.

executableIsInstalled()

This probe will search your path, and your current vendor/bin looking for a particular executable.

phpExtensionLoaded()

Check that a particular PHP extension is loaded.

queueIsRunning()

This probe checks that your laravel queue is running.

scheduleIsRunning()

Make sure that the artisan schedule is being run.


Customising the name of your probe

By default, when scrutiny outputs details of your probe (e.g. if it fails, or in the history) it guesses a name based on the configuration setting.

If this default name would output sensitive information, such as API keys, then you'll want to set the name of the probe.

You override the name by calling ->named() after you set the probe:


Customising the executable search path

Certain probes will need to search for a certain executable on disk.

By default, scrutiny will search directories in your $PATH environment variable as well as your base_path() and your vendor/bin.

But this isn't always enough.

You can add directories to the path when you configure your probes:


Debugging locally

Your configured probes are rate-limited to 1 check every minute.

This isn't what you want when first setting up your probes, so to bypass this locally set DEBUG=true in your .env file.


Artisan command

Run php artisan scrutiny:check-probes to check if your probes are passing.

This command is not rate-limited, so it's a good way to test immediately after making a change, or even as part of a deployment process.

The command will return 0 on success and 1 on failure.


How to configure Oh Dear

Configure a new site in Oh Dear with the following setting:

  1. In Settings (the General tab), point to the scrutiny URL for your domain yourdomain.com/~scrutiny/check-probes where yourdomain.com is your production domain
  2. Scrutiny will return an HTTP status of 590 Some Tests Failed when something is awry – this is a custom code

How to configure pingdom

Configure a new check in pingdom with the following setting:

  1. Add an uptime check in pingdom to hit https://yourdomain.com/~scrutiny/check-probes where yourdomain.com is your production domain
  2. Scrutiny will return an HTTP status of 590 Some Tests Failed when something is awry – this is a custom code

Contributing

Any contribution is received with humility and gratitude.

Thank you if you're considering contributing an improvement to this project.

Process:

  1. Fork, change, create pull-request
  2. Tell us why/how your PR will benefit the project
  3. We may ask you for clarification, but we'll quickly let you know whether or not it's likely your change will be merged

😘 Xx


All versions of scrutiny with dependencies

PHP Build Version
Package Version
No informations.
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 brightmachine/scrutiny contains the following files

Loading the files please wait ....