Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Health Laravel Package

spatie/laravel-health

Monitor your Laravel app’s health by registering checks (disk space, etc.) with warning/fail thresholds. Get notified via mail or Slack when checks degrade, and extend with custom checks for proactive alerting.

View on GitHub
Deep Wiki
Context7

title: CPU load weight: 5

This check makes sure that your CPU load isn't too high.

Installation

To use this check, you must install the spatie/cpu-load-health-check package

composer require spatie/cpu-load-health-check

Usage

The package monitors the Unix CPU load numbers. By default, three numbers are available:

  • load in the last minute
  • load in the last 5 minutes
  • load in the last 15 minutes

You can make the check fail by using on of these three functions:

  • failWhenLoadIsHigherInTheLastMinute($load)
  • failWhenLoadIsHigherInTheLast5Minutes($load)
  • failWhenLoadIsHigherInTheLast15Minutes($load)

Here's how you can register the check.

use Spatie\Health\Facades\Health;
use Spatie\CpuLoadHealthCheck\CpuLoadCheck;

Health::checks([
    CpuLoadCheck::new()
        ->failWhenLoadIsHigherInTheLast5Minutes(2.0)
        ->failWhenLoadIsHigherInTheLast15Minutes(1.5),
]);
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport