cxj/looking-glass

Central monitor and display for status data from remote sources

0.0.1 2023-03-21 02:30 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Looking Glass is a Laravel-based application to provide a quick overview of status and health data from multiple applications. It provides simple dashboard listing all configured application checks and their current status. Any application capable of calling an HTTP webhook can communicate its status data to Looking Glass for presentation.

Requirements

A PHP 8.1+ host with access to a reasonable SQL database, preferably MySQL or equivalent.

Installation

Install the package via composer:

composer require cxj/looking-glass

Run the migrations with:

php artisan migrate

Usage

This is early beta software. More functionality and documentation to come.

  • User accounts are by default open registration to all at the /register URL path. You will probably want to implement some sort of restrictions on potential users.

  • Create a user account and log in to see the current status dashboard.

  • The Laravel schedule worker (e.g. artisan schedule:work) needs to be run regularly via cron or similar mechanism

  • Makes use of the Spatie Laravel Health package, see Spatie's fine documentation for more details.

  • Makes use of the Spatie Webhook Client package, see Spatie's project for more details. One can easily send webhook calls to Looking Glass using the Spatie Webhook Server package. The JSON payload is simple as is the bearer token authentication. Just about any software should be able to successfully call the Looking Glass webhook to deliver status payloads.

Example JSON payload:

{
	"name": "Test-app",
	"label": "Test-label",
	"result": {
		"meta": [],
		"ended_at": "",
		"status": "ok",
		"notificationMessage": "notification-message",
		"shortSummary": "short-summary"
	}
}

If you wish to use Looking Glass to monitor Laravel applications, take a look at the Laravel Looking Glass Client package.

Testing

./vendor/bin/pest

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The GNU Affero General Public License Version 3. Please see License File for more information.