承接 maantje/pulse-database 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

maantje/pulse-database

最新稳定版本:v0.3.0

Composer 安装命令:

composer require maantje/pulse-database

包简介

A Laravel Pulse card for database status

README 文档

README

Get real-time insights into the status of your database

Example

example

Installation

Install the package using Composer:

composer require maantje/pulse-database

Register the recorder

In your pulse.php configuration file, register the DatabaseRecorder with the desired settings:

Uncertain about the available values? You can execute show status against your database to view all the options at your disposal.

return [
    // ...
    
    'recorders' => [
        \Maantje\Pulse\Database\Recorders\DatabaseRecorder::class => [
            'connections' => [
                'mysql_another' => [
                    'values' => [
                        'Connections',
                        'Threads_connected',
                        'Threads_running',
                        'Innodb_buffer_pool_reads',
                        'Innodb_buffer_pool_read_requests',
                        'Innodb_buffer_pool_pages_total',
                        'Max_used_connections'
                    ],
                    'aggregates' => [
                        'avg' => [
                            'Threads_connected',
                            'Threads_running',
                            'Innodb_buffer_pool_reads',
                            'Innodb_buffer_pool_read_requests',
                            'Innodb_buffer_pool_pages_total',
                        ],
                        'max' => [
                            //
                        ],
                        'count' => [
                            //
                        ],
                    ],
                ],
                'mysql' => [
                    'values' => [
                        'Connections',
                        'Threads_connected',
                        'Threads_running',
                        'Innodb_buffer_pool_reads',
                        'Innodb_buffer_pool_read_requests',
                        'Innodb_buffer_pool_pages_total',
                        'Max_used_connections'
                    ],
                    'aggregates' => [
                        'avg' => [
                            'Threads_connected',
                            'Threads_running',
                            'Innodb_buffer_pool_reads',
                            'Innodb_buffer_pool_read_requests',
                            'Innodb_buffer_pool_pages_total',
                        ],
                        'max' => [
                            //
                        ],
                        'count' => [
                            //
                        ],
                    ],
                ]
            ]
        ],
    ]
]

Ensure you're running the pulse:check command.

Add to your dashboard

Integrate the card into your Pulse dashboard by publish the vendor view. and then adding the following to the dashboard.blade.php file:

<livewire:database cols='6' title="Active threads" :values="['Threads_connected', 'Threads_running']" :graphs="[
    'avg' => ['Threads_connected' => '#ffffff', 'Threads_running' => '#3c5dff'],
]" />

<livewire:database cols='6' title="Connections" :values="['Connections', 'Max_used_connections']" />

<livewire:database cols='full' title="Innodb" :values="['Innodb_buffer_pool_reads', 'Innodb_buffer_pool_read_requests', 'Innodb_buffer_pool_pages_total']" :graphs="[
    'avg' => ['Innodb_buffer_pool_reads' => '#ffffff', 'Innodb_buffer_pool_read_requests' => '#3c5dff'],
]" />

And that's it! Enjoy enhanced visibility into your database status on your Pulse dashboard.

统计信息

  • 总下载量: 273.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 110
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 110
  • Watchers: 1
  • Forks: 5
  • 开发语言: Blade

其他信息

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