PHPackages                             hamzi/corewatch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. hamzi/corewatch

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

hamzi/corewatch
===============

Production-ready embedded DevOps dashboard for Laravel — server metrics, log streaming, safe ops panel, and alerting without external daemons.

v2.1.7(1mo ago)346[1 PRs](https://github.com/hamdyelbatal122/corewatch/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since May 19Pushed 1mo agoCompare

[ Source](https://github.com/hamdyelbatal122/corewatch)[ Packagist](https://packagist.org/packages/hamzi/corewatch)[ Docs](https://github.com/hamdyelbatal122/CoreWatch)[ RSS](/packages/hamzi-corewatch/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (9)Dependencies (11)Versions (17)Used By (0)

Laravel CoreWatch 🛡️
====================

[](#laravel-corewatch-️)

**Embedded DevOps dashboard for Laravel — monitor, debug, and operate your server without leaving your app**

[![Latest Stable Version](https://camo.githubusercontent.com/a340dbda5fa7b719cb86b050b2b83095d6856a1e45e7f2ef6c7cec9b18f869ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616d7a692f636f726577617463683f7374796c653d666c61742d73717561726526636f6c6f723d354635374339)](https://packagist.org/packages/hamzi/corewatch)[![Build Status](https://camo.githubusercontent.com/d8737aa7d52ec8390b100d69d3c8ca5c92a9b839e70c60fd90a963217c945348/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68616d6479656c626174616c3132322f436f726557617463682f63692e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/hamdyelbatal122/CoreWatch/actions)[![Total Downloads](https://camo.githubusercontent.com/153ba72906dd890e0af95a4a8ceaa1d1bfdf7c2103666792eed1b6539c1e5dae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616d7a692f636f726577617463683f7374796c653d666c61742d73717561726526636f6c6f723d313042393831)](https://packagist.org/packages/hamzi/corewatch)[![License](https://camo.githubusercontent.com/487d71e9ee28ea9f5b0ff56a35c29d8a3ee7fc5fdca36b6051d48af6ecea73dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68616d7a692f636f726577617463683f7374796c653d666c61742d73717561726526636f6c6f723d373443383132)](https://packagist.org/packages/hamzi/corewatch)[![PHP Version](https://camo.githubusercontent.com/70d9a9db9ed103238f65608a42f3bc21524f7666e419a62fae1d77311c6f0fe8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f68616d7a692f636f726577617463683f7374796c653d666c61742d73717561726526636f6c6f723d303037454336)](https://php.net)

[Quick Start](#-quick-start-30-seconds) · [Why CoreWatch?](#-why-corewatch) · [Developer API](#-developer-api-programmatic-access) · [Architecture](docs/ARCHITECTURE.md) · [Filament](docs/FILAMENT.md) · [Troubleshooting](docs/TROUBLESHOOTING.md)

---

Important

**CoreWatch** is a zero-dependency, self-contained server monitoring utility built for production Laravel systems. No Netdata, no Grafana agent, no external daemon — just `composer require` and you have a full DevOps terminal inside your admin panel.

---

🤔 Why CoreWatch?
----------------

[](#-why-corewatch)

ProblemCoreWatch Solution"I need server metrics but don't want another daemon"Reads `/proc` directly — zero external processes"Log files are 5GB and crash my log viewer"O(1) memory backward-seeking parser streams any file size"I'm afraid of RCE in admin panels"Whitelisted command keys only — no raw shell input"I use Filament/Nova and need embedded monitoring"Livewire component + modular Blade partials"I need alerts when CPU/RAM spikes"Scheduled sentinel with Slack, Telegram, or custom events"Load balancer needs a health endpoint"`GET /corewatch/api/health` returns 200/503### CoreWatch vs. Alternatives

[](#corewatch-vs-alternatives)

FeatureCoreWatchNetdataLaravel TelescopeGrafana AgentZero external daemon✅❌✅❌Server metrics (CPU/RAM/Disk)✅✅❌✅Log file streaming✅❌❌❌Safe ops panel✅❌❌❌Laravel-native install✅❌✅❌Filament/Livewire embed✅❌❌❌Built-in alerting✅✅❌✅---

⚡ Quick Start (30 seconds)
--------------------------

[](#-quick-start-30-seconds)

```
composer require hamzi/corewatch
php artisan corewatch:install
```

Open **`/corewatch`** in your browser. That's it.

 [![CoreWatch Dashboard Preview](docs/images/dashboard-preview.png)](docs/images/dashboard-preview.png)

For production, add `auth` middleware in `config/corewatch.php` and schedule health checks:

```
// routes/console.php
Schedule::command('corewatch:heartbeat')->everyMinute();
Schedule::command('corewatch:check-health')->everyFiveMinutes();
```

---

🗺️ System Architecture Flowchart
--------------------------------

[](#️-system-architecture-flowchart)

The following diagram illustrates how CoreWatch isolates data collection, streams log buffers, routes controller requests, and schedules alerting triggers:

 ```
graph TD
    %% Elements
    A["💻 Master Dashboard View  (AlpineJS Client)"]
    B["🛣️ CoreWatch Routing Gateway  (Protected Middleware)"]
    C["⚙️ SystemMetricsCollector  (Clean Architecture Actions)"]
    D["📄 LogFileRepository  (O-1 fseek streaming)"]
    E["⚡ Whitelisted Services Exec  (RCE-Proof Command List)"]
    F["⏰ Sentinel Health Command  (Artisan Cron Daemon)"]

    G["📡 Host System  (/proc, top processes, disk filesystem)"]
    H["💾 Database Engine  (MySQL, SQLite, PGSQL Sizing)"]
    I["💬 DevOps Channels  (Slack & Telegram API)"]

    %% Styling Definitions
    classDef primary fill:#0c1528,stroke:#00ccff,stroke-width:2px,color:#fff;
    classDef secondary fill:#050b18,stroke:#1f2e4d,stroke-width:1px,color:#aaa;
    classDef alert fill:#0c1528,stroke:#ff3366,stroke-width:2px,color:#fff;

    %% Class Assignments
    class A,C,D,E primary;
    class B,G,H secondary;
    class F,I alert;

    %% Connections
    A -->|1. Poll Metrics API| B
    B --> C
    C -->|Native Syscalls| G
    C -->|Schema Sizing| H
    A -->|2. Stream Log Chunk| B
    B --> D
    D -->|O-1 Constant Seek Buffer| G
    A -->|3. Trigger Secure Action| B
    B --> E
    E -->|Execute Whitelist| G
    F -->|Resource Threshold Checks| C
    F -->|Alert Breaches| I
```

      Loading ---

🏗️ Package Architecture (Clean Architecture)
--------------------------------------------

[](#️-package-architecture-clean-architecture)

CoreWatch follows layered architecture with clear separation of concerns:

```
src/
├── Contracts/          # Interfaces (DIP — depend on abstractions)
├── Domain/             # Business rules (Alert VO, HealthThresholdEvaluator)
├── Application/        # Use cases (Actions) + DTOs
├── Infrastructure/     # Collectors, Repositories, Notifications, Shell
├── Http/               # Controllers, Middleware, Form Requests
├── Console/            # Artisan commands (thin — delegate to Actions)
└── Livewire/           # UI embedding component

```

LayerResponsibilityExample**Contracts**Define abstractions`SystemMetricsCollectorInterface`**Domain**Pure business logic`HealthThresholdEvaluator`**Application**Orchestrate use cases`GetServerMetricsAction`**Infrastructure**External I/O`LogFileRepository`, `CpuMetricsCollector`**Http**HTTP boundary`DashboardController` (thin)---

🧱 Modular `@include` Partial Architecture
-----------------------------------------

[](#-modular-include-partial-architecture)

CoreWatch separates all diagnostics into elegant, self-contained monospace tables inside `resources/views/partials/`. This modular structure allows clients to easily publish views and include specific tables anywhere inside their custom dashboards:

Partial Blade View PathDiagnostic TargetLayout Display StyleCustomization Purpose`partials.cpu`CPU Cores &amp; Load averagesMonospace UNIX TableMonitor core load thresholds (1M, 5M, 15M)`partials.ram`Physical Memory (RAM) AllocationMonospace Memory TableTrack active, free, and cached allocation bytes`partials.disk`Disk Storage Saturated VolumesSaturated Space TableMonitor root storage partition size limits`partials.processes`Active CPU Top Linux ProcessesLive CLI System TableIdentify high CPU usage processes (PID, User)`partials.database`Database Engine &amp; Schema sizeMonospace DB Status TableTrack table counts and database file sizes`partials.app-checks`Operational Application IntegrityStatus Indicator ListVerify Cache, Queue, and Security modes`partials.specifications`OS Kernel &amp; Laravel specificationsStatic Specs TableQuick access to PHP, OS, and server version info`partials.services`Whitelisted system task controlsCommand Action TableSafe execution of authorized terminal commands`partials.logs`Live chunked stream terminal viewCyberpunk Log ConsoleView and filter real-time logs with pagination---

⚡ Key Highlights
----------------

[](#-key-highlights)

1. **Stealthy &amp; Dynamic UI:** Self-contained Blade views styled with a premium Cyberpunk DevOps dark theme. Uses lightweight Tailwind CSS &amp; AlpineJS for dynamic reactivity without bundler dependencies.
2. **Zero-overhead Log Viewer:** An advanced, memory-efficient backward-seeking chunked file parser that streams Laravel/Nginx/Apache logs without memory exhaustion even on multi-gigabyte files.
3. **Advanced System Diagnostics:** Native `/proc` filesystem parsing coupled with fast system command fallbacks to deliver instant CPU, RAM, Disk, and system uptime metrics.
4. **Pre-Whitelisted Services Controller:** Safe administrative triggers (e.g. queue restart, redis flush, cache clearing) mapping to strict command keys preventing arbitrary RCE vulnerabilities.
5. **Top Active CPU Processes:** Live sorted process statistics terminal displaying CPU load, RAM allocation, PID, user, and running commands on Linux hosts.
6. **Database Telemetry Widget:** Direct schema capacity details, connection indicators, and tables count monitoring for MySQL, PostgreSQL, and SQLite database connection engines.
7. **App Integrity Checks:** Automated operational verification for Cache drivers, Artisan Queue connections, Environment status, and Security debug mode states.
8. **Livewire Embed Support:** Built-in dynamic Livewire component (`livewire:corewatch-dashboard`) for drag-and-drop embedding inside administrative panels like **Filament** and **Laravel Nova**.
9. **Continuous Sentinel Daemon:** Scheduled console monitor (`corewatch:check-health`) that alerts your DevOps channels (Slack &amp; Telegram) when resource thresholds are breached.
10. **Developer Facade API:** `CoreWatch::metrics()`, `CoreWatch::health()`, and `ThresholdBreached` events for custom integrations.
11. **One-Command Install:** `php artisan corewatch:install` publishes config and prints your production checklist.
12. **Health Probe Endpoint:** `GET /corewatch/api/health` for uptime monitors, load balancers, and Kubernetes liveness probes.

---

🛠️ Installation &amp; Setup
---------------------------

[](#️-installation--setup)

### Production Install (Packagist)

[](#production-install-packagist)

```
composer require hamzi/corewatch
php artisan corewatch:install
```

### Publish Views (Optional — for customization)

[](#publish-views-optional--for-customization)

```
php artisan corewatch:install --views
# or manually:
php artisan vendor:publish --tag=corewatch-views
```

### Local Development (Path Repository)

[](#local-development-path-repository)

```
"repositories": [{ "type": "path", "url": "../CoreWatch" }]
```

```
composer require hamzi/corewatch:dev-main
php artisan corewatch:install
```

---

🔌 Flexible Dashboard Integration Options
----------------------------------------

[](#-flexible-dashboard-integration-options)

CoreWatch is designed to fit seamlessly wherever your administration operations are managed:

Tip

Make sure to wrap any custom page elements that use these modular tables inside the parent AlpineJS data controller: `...`.

### Option A: Standalone Routed View

[](#option-a-standalone-routed-view)

Once active, navigate directly to `/corewatch` to view the comprehensive Cyberpunk DevOps terminal.

### Option B: Modular Table Includes

[](#option-b-modular-table-includes)

Publish the views and embed specific partial views inside your existing administrative panels:

```

        @include('corewatch::partials.cpu')
        @include('corewatch::partials.database')

```

### Option C: Blade Custom Component Embeds

[](#option-c-blade-custom-component-embeds)

Embed the full dashboard seamlessly:

```

```

### Option D: Livewire Drag-and-Drop

[](#option-d-livewire-drag-and-drop)

Embed the Livewire component in Filament dashboards or custom panels:

```

```

---

⚙️ Threshold Sentinel alerts Alerting
-------------------------------------

[](#️-threshold-sentinel-alerts-alerting)

Enable real-time warnings on Slack or Telegram by configuring your host `.env`:

```
# Slack Alerts Configuration
COREWATCH_SLACK_WEBHOOK_URL="https://hooks.slack.com/services/YOUR_SLACK_WEBHOOK_URL"
COREWATCH_SLACK_CHANNEL="#devops-alerts"

# Telegram Alerts Configuration
COREWATCH_TELEGRAM_BOT_TOKEN="0000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
COREWATCH_TELEGRAM_CHAT_ID="-1000000000000"
```

Register heartbeat and health checks in `routes/console.php`:

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('corewatch:heartbeat')->everyMinute();
Schedule::command('corewatch:check-health')->everyFiveMinutes();
```

---

👨‍💻 Developer API (Programmatic Access)
---------------------------------------

[](#‍-developer-api-programmatic-access)

CoreWatch exposes a **Facade** and **Manager** for use in your own code, jobs, and custom admin panels:

```
use Hamzi\CoreWatch\Facades\CoreWatch;

// Full metrics snapshot
$metrics = CoreWatch::metrics();

// Individual collectors
$cpu  = CoreWatch::cpu();
$ram  = CoreWatch::ram();
$disk = CoreWatch::disk();

// Lightweight health check (for uptime monitors)
$health = CoreWatch::health();
// ['status' => 'healthy', 'healthy' => true, 'checks' => [...], 'timestamp' => '...']

// Read logs programmatically
$logs = CoreWatch::readLogs('laravel', page: 1);

// Run a whitelisted service command
CoreWatch::runService('cache_clear');
```

### Health Endpoint (Uptime Monitors / K8s Probes)

[](#health-endpoint-uptime-monitors--k8s-probes)

```
GET /corewatch/api/health

```

Returns `200` when healthy, `503` when thresholds are breached. Configure in `.env`:

```
COREWATCH_HEALTH_ENDPOINT=true
COREWATCH_HEALTH_PUBLIC=false  # Set true for public load-balancer probes
```

### Prometheus (Grafana / Monitoring)

[](#prometheus-grafana--monitoring)

```
GET /corewatch/api/metrics/prometheus

```

```
COREWATCH_PROMETHEUS_ENDPOINT=true
COREWATCH_PROMETHEUS_PUBLIC=false
```

### Arabic Localization

[](#arabic-localization)

```
// AppServiceProvider or config/app.php
'locale' => 'ar',
```

Publish translations: `php artisan vendor:publish --tag=corewatch-lang`

### Custom Alert Channels (Events)

[](#custom-alert-channels-events)

Hook into threshold breaches in your `AppServiceProvider`:

```
use Hamzi\CoreWatch\Events\ThresholdBreached;

Event::listen(ThresholdBreached::class, function (ThresholdBreached $event) {
    // Send to PagerDuty, Discord, email, etc.
    foreach ($event->alerts as $alert) {
        // $alert->name, $alert->current, $alert->severity
    }
});
```

GuideDescription[Architecture](docs/ARCHITECTURE.md)Layer diagram, data flow, and extension guide[Filament Integration](docs/FILAMENT.md)Embed in Filament admin panels[Troubleshooting](docs/TROUBLESHOOTING.md)Common issues and fixes[Deployment](docs/DEPLOYMENT.md)Production checklist[Contributing](CONTRIBUTING.md)Development workflow and coding standards[Security](SECURITY.md)Vulnerability reporting policy---

🔒 Security Practices &amp; Fallbacks
------------------------------------

[](#-security-practices--fallbacks)

1. **RCE Protection:** CoreWatch never accepts raw input strings to execute shell commands. It maps requests to rigid keys registered in `config/corewatch.php` and blocks any unauthorized requests.
2. **Memory Safety:** The Log Parser uses direct `fseek` backward seeking to stream logs in 64KB blocks, maintaining a strict $O(1)$ memory consumption profile regardless of log file size.
3. **Graceful Fallbacks:** If commands like `exec` or `proc_open` are disabled in `php.ini`, the package falls back to parsing native `/proc` direct files and displays interactive notifications.

---

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance91

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

15

Last Release

49d ago

Major Versions

v1.0.5 → v2.0.02026-06-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36019461?v=4)[Hamdy Elbatal](/maintainers/hamdyelbatal122)[@hamdyelbatal122](https://github.com/hamdyelbatal122)

---

Top Contributors

[![hamdyelbatal122](https://avatars.githubusercontent.com/u/36019461?v=4)](https://github.com/hamdyelbatal122 "hamdyelbatal122 (76 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

devopslaravellaravel-packagelivewirelog-viewerserver-healthserver-monitoringsysadminlaravelmonitoringdevopslivewirelog vieweralertsdashboardfilamentserver monitoringuptimeserver-health

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hamzi-corewatch/health.svg)

```
[![Health](https://phpackages.com/badges/hamzi-corewatch/health.svg)](https://phpackages.com/packages/hamzi-corewatch)
```

###  Alternatives

[anousss007/vigilance

A driver-agnostic control center for Laravel queues, jobs, commands and the scheduler. Monitor what ran (with parameters), see failures, and dispatch jobs or run artisan commands manually from a self-contained dashboard.

1756.8k](/packages/anousss007-vigilance)[nightowl/agent

NightOwl monitoring agent — collects telemetry from laravel/nightwatch and writes to PostgreSQL

771.7k](/packages/nightowl-agent)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

461.8k](/packages/ercogx-laravel-filament-starter-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
