Pulse Database

maantje/pulse-database image

Pulse Database stats

Downloads
26
Stars
7
Open Issues
1
Forks
1

View on GitHub →

A Laravel Pulse card for database status

Database status card for Laravel Pulse

Get real-time insights into the status of your database

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:

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 modifying the dashboard.blade.php file:

<x-pulse>
<livewire:pulse.servers cols="full" />
 
+ <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'],
+ ]" />
 
<livewire:pulse.usage cols="4" rows="2" />
 
<livewire:pulse.queues cols="4" />
 
<livewire:pulse.cache cols="4" />
 
<livewire:pulse.slow-queries cols="8" />
 
<livewire:pulse.exceptions cols="6" />
 
<livewire:pulse.slow-requests cols="6" />
 
<livewire:pulse.slow-jobs cols="6" />
 
<livewire:pulse.slow-outgoing-requests cols="6" />
 
</x-pulse>

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

maantje photo

Code enthusiast, Back-end developer @ Qlic Internet solutions, Freelance Developer.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Maantje Pulse Database Related Articles

Laracon EU Videos are now out image

Laracon EU Videos are now out

Read article
Database Status Card for Laravel Pulse image

Database Status Card for Laravel Pulse

Read article
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Celebian logo

Celebian

Celebian is a social media marketing agency specializing in helping their clients go viral on TikTok. Whether you're looking to reach a bigger audience or gain more Tiktok followers, likes, and views, they've got you covered.

Celebian