hashcrypttech / hashguardian
Self-hosted monitoring and observability dashboard for Laravel applications
Package info
github.com/hashcrypttech/HashGuardian
Language:Blade
pkg:composer/hashcrypttech/hashguardian
Requires
- php: ^8.2
- illuminate/console: ^11.0|^12.0
- illuminate/contracts: ^11.0|^12.0
- illuminate/database: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/routing: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0
- phpunit/phpunit: ^11.0
This package is not auto-updated.
Last update: 2026-05-13 09:43:38 UTC
README
Self-hosted monitoring and observability dashboard for Laravel applications. Track requests, queries, exceptions, jobs, and more — all within your own infrastructure.
Screenshots
Server Monitoring
Htop Monitor
Requirements
- PHP 8.2+
- Laravel 11.x or 12.x
Installation
Install the package via Composer:
composer require hashcrypttech/hashguardian
The service provider and facade are auto-discovered by Laravel. No manual registration is needed.
Run the install command to publish the config, migrations, and assets:
php artisan hashguardian:install
This will:
- Publish the
config/hashguardian.phpconfiguration file - Publish the
HashGuardianServiceProvidertoapp/Providers/ - Publish frontend assets to
public/vendor/hashguardian/ - Run database migrations
Configuration
After installation, configure HashGuardian via config/hashguardian.php or environment variables:
HASHGUARDIAN_ENABLED=true HASHGUARDIAN_PATH=hashguardian HASHGUARDIAN_DB_CONNECTION=mysql HASHGUARDIAN_PRUNE_HOURS=72
Authorization
By default, the HashGuardian dashboard is only accessible in the local environment. To configure access in production, define the viewHashGuardian gate in your App\Providers\HashGuardianServiceProvider:
use Hashcrypttech\HashGuardian\Facades\HashGuardian; HashGuardian::auth(function ($request) { return in_array($request->user()?->email, [ 'admin@example.com', ]); });
Dashboard
Access the monitoring dashboard at:
https://your-app.com/hashguardian
Watchers
HashGuardian includes 20 built-in watchers that can be individually enabled/disabled:
| Watcher | Description | Env Variable |
|---|---|---|
| RequestWatcher | HTTP requests and response times | HASHGUARDIAN_REQUEST_WATCHER |
| QueryWatcher | Database queries with slow query detection | HASHGUARDIAN_QUERY_WATCHER |
| ExceptionWatcher | Exceptions with stack traces | HASHGUARDIAN_EXCEPTION_WATCHER |
| JobWatcher | Queue jobs | HASHGUARDIAN_JOB_WATCHER |
| OutgoingRequestWatcher | Outgoing HTTP calls | HASHGUARDIAN_OUTGOING_REQUEST_WATCHER |
| CacheWatcher | Cache hits, misses, writes | HASHGUARDIAN_CACHE_WATCHER |
| MailWatcher | Sent emails | HASHGUARDIAN_MAIL_WATCHER |
| NotificationWatcher | Notifications | HASHGUARDIAN_NOTIFICATION_WATCHER |
| CommandWatcher | Artisan commands | HASHGUARDIAN_COMMAND_WATCHER |
| ScheduleWatcher | Scheduled tasks | HASHGUARDIAN_SCHEDULE_WATCHER |
| LogWatcher | Log entries | HASHGUARDIAN_LOG_WATCHER |
| ActivityWatcher | User activity tracking | HASHGUARDIAN_ACTIVITY_WATCHER |
| BatchWatcher | Batch operations | HASHGUARDIAN_BATCH_WATCHER |
| DumpWatcher | dump() / dd() output |
HASHGUARDIAN_DUMP_WATCHER |
| EventWatcher | Laravel events | HASHGUARDIAN_EVENT_WATCHER |
| GateWatcher | Authorization checks | HASHGUARDIAN_GATE_WATCHER |
| ModelWatcher | Eloquent model events | HASHGUARDIAN_MODEL_WATCHER |
| RedisWatcher | Redis operations | HASHGUARDIAN_REDIS_WATCHER |
| ViewWatcher | View rendering | HASHGUARDIAN_VIEW_WATCHER |
Custom Metrics
Track custom business metrics in your application:
use Hashcrypttech\HashGuardian\Facades\HashGuardian; // Count events HashGuardian::count('orders.placed'); // Record numeric metrics HashGuardian::metric('payment.amount', 99.99); // Time operations HashGuardian::startTimer('api.call'); // ... your code ... HashGuardian::stopTimer('api.call');
API Access
Enable the REST API for programmatic access:
HASHGUARDIAN_API_ENABLED=true
Create API tokens:
php artisan hashguardian:token create "My Token"
Artisan Commands
| Command | Description |
|---|---|
hashguardian:install |
Install the package (publish config, migrations, assets) |
hashguardian:publish |
Publish/update frontend assets |
hashguardian:prune |
Remove old entries |
hashguardian:clear |
Clear all recorded data |
hashguardian:pause |
Temporarily pause recording |
hashguardian:resume |
Resume recording |
hashguardian:monitor |
Start server metrics collection (long-running) |
hashguardian:aggregate |
Build metric aggregates for trends |
hashguardian:token |
Manage API tokens |
hashguardian:stats |
Display summary statistics |
hashguardian:tail |
Live-tail entries in the terminal |
hashguardian:report |
Generate a summary report |
Scheduled Tasks
Add these to your routes/console.php or scheduler:
use Illuminate\Support\Facades\Schedule; Schedule::command('hashguardian:prune')->daily(); Schedule::command('hashguardian:aggregate')->hourly();
Server Monitoring
Enable server resource monitoring (CPU, RAM, disk, network):
HASHGUARDIAN_SERVER_MONITORING=true
Run the monitor as a background process:
php artisan hashguardian:monitor
Publishing Assets
To update assets after a package update:
php artisan hashguardian:publish
Or use vendor:publish with tags:
php artisan vendor:publish --tag=hashguardian-config php artisan vendor:publish --tag=hashguardian-assets php artisan vendor:publish --tag=hashguardian-provider
About
HashGuardian is developed and maintained by Hashcrypt Technologies Pvt. Ltd., a software development company based in Rajkot, Gujarat, India.
- Website: https://hashcrypt.com
- Email: contact@hashcrypt.com
- Phone: +91 90332 72899
- Address: 3rd Floor, United Square, Nana Mava Rd, Karan Park, Rajkot, Gujarat 360001
License
HashGuardian is open-sourced software licensed under the MIT license.

