illuma-law/healthcheck-redis 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

illuma-law/healthcheck-redis

最新稳定版本:v0.1.4

Composer 安装命令:

composer require illuma-law/healthcheck-redis

包简介

Focused redis health check for Spatie's Laravel Health package.

README 文档

README

Tests Packagist License Latest Stable Version

A focused redis health check for Spatie's Laravel Health package.

This package provides direct health checks to verify that the PHP redis extension is installed and that your Redis instance is operating within safe memory limits.

Features

  • Extension Detection: Checks if the PHP redis extension is enabled and reports the specific version installed.
  • Memory Monitoring: Verifies that your Redis instance is not exceeding its maxmemory limit (or a custom threshold).
  • Configurable Strictness: Choose whether a missing extension or high memory usage should return a Warning or a Failure status.

Installation

Require this package with composer:

composer require illuma-law/healthcheck-redis

Usage & Integration

Register the checks inside your application's health service provider (e.g. AppServiceProvider or a dedicated HealthServiceProvider), alongside your other Spatie Laravel Health checks:

1. Redis Extension Check

use IllumaLaw\HealthCheckRedis\RedisExtensionCheck;
use Spatie\Health\Facades\Health;

Health::checks([
    RedisExtensionCheck::new()->required(true),
]);

2. Redis Memory Check

use IllumaLaw\HealthCheckRedis\RedisMemoryCheck;
use Spatie\Health\Facades\Health;

Health::checks([
    RedisMemoryCheck::new()
        ->connection('default')
        ->thresholdPercent(90),
]);

Expected Result States

  • Ok: The extension is installed and Redis memory usage is within safe limits.
  • Warning: The extension is missing (if not required) or Redis memory usage is above the warning threshold.
  • Failed: The extension is missing (if required) or Redis has reached its maxmemory limit.

Testing

Run the test suite:

composer test

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固