insenseanalytics / nova-server-monitor
A Laravel Nova tool for Spatie's Server Monitor library.
Installs: 32 980
Dependents: 0
Suggesters: 0
Security: 0
Stars: 64
Watchers: 2
Forks: 4
Open Issues: 0
Language:Vue
Requires
- php: >=7.1.0
- spatie/laravel-server-monitor: ^1.0
This package is auto-updated.
Last update: 2024-11-08 05:31:06 UTC
README
This Nova tool allows you to monitor server health checks such as database, redis, diskspace, elasticsearch, etc. It depends on the Spatie Server Monitor library.
Quick Installation
You can install this tool into a Laravel app that uses Nova via composer:
composer require insenseanalytics/nova-server-monitor
Next, if you do not have package discovery enabled, you need to register the provider in the config/app.php
file:
'providers' => [ ..., Insenseanalytics\NovaServerMonitor\ToolServiceProvider::class, ]
Finally, register the tool in your NovaServiceProvider.php
file:
public function tools() { \Insenseanalytics\NovaServerMonitor\NovaServerMonitor::make() ->onConnection('server_monitor')->hosts(['example1.com']) ->checks(['mysql']), }
Specify your database connection using the onConnection
method. Typically the server that monitors your app's checks would be a separate app, and we would make a separate connection in config/database.php
that connects to the monitoring server's database. If you want to display all checks and hosts, you do not need to call the hosts
and checks
methods.
Contributing
We are open to PRs as long as they're backed by tests and a small description of the feature added / problem solved.
License
The MIT License (MIT). Please see License File for more information.