creacoon / laravel-dashboard-netdata-tile
Netdata tile for spatie/laravel-dashboard showing the status of every node streaming to a Netdata parent
Package info
github.com/creacoon/laravel-dashboard-netdata-tile
pkg:composer/creacoon/laravel-dashboard-netdata-tile
Requires
- php: ^8.3
- illuminate/http: ^11.0|^12.0|^13.0
- livewire/livewire: ^4.0
- spatie/laravel-dashboard: ^4.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A tile for spatie/laravel-dashboard that shows every node streaming to a Netdata parent as a hexagon, coloured by its status:
| Colour | Status |
|---|---|
| Green | Reachable, no raised alerts |
| Orange | Reachable, at least one warning |
| Red | Reachable, at least one critical alert |
| Grey | Stale or unreachable |
Each hexagon shows the node name and its critical (C) and warning (W) alert counts. The header shows how many nodes are online.
The data comes from the parent's /api/v2/nodes endpoint, so the application must be able to reach the parent on its API port (19999 by default).
Installation
composer require creacoon/laravel-dashboard-netdata-tile
Add the tile configuration to the tiles key of config/dashboard.php:
'netdata' => [ 'parent_url' => env('NETDATA_PARENT_URL'), 'refresh_interval_in_seconds' => 60, ],
Schedule the fetch command in your console kernel or routes/console.php:
$schedule->command(\Creacoon\NetdataTile\FetchDataFromNetdataCommand::class)->everyMinute();
Add the tile to your dashboard:
<x-dashboard> <livewire:netdata-tile position="a1:b2" /> </x-dashboard>
When the parent is unreachable or returns an error, the command fails and the tile keeps showing the last fetched nodes.
Customising the view
php artisan vendor:publish --tag=dashboard-netdata-tile-views
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.