Download the PHP package phattarachai/ops-laravel without Composer
On this page you can find all versions of the php package phattarachai/ops-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phattarachai/ops-laravel
More information about phattarachai/ops-laravel
Files in phattarachai/ops-laravel
Package ops-laravel
Short Description Self-hosted Laravel monitoring that replaces Pulse: request, job, schedule and outgoing-HTTP telemetry, rollups, an Inertia React dashboard, and alerting by mail and Slack.
License MIT
Informations about the package ops-laravel
Ops for Laravel
Self-hosted Laravel monitoring that replaces Pulse: request, job, schedule and outgoing-HTTP telemetry, rollups, an
Inertia React dashboard, and alerting by mail and Slack. The framework-free math (rollups, latency histograms, alert rule
evaluation, incident lifecycle) lives in phattarachai/ops-core.
Status: 0.x. The API can still change between minor versions until
v1.0.
What it records
| Recorder | Source | Lands in |
|---|---|---|
| Incoming requests | terminable middleware (after the response is sent) → Redis minute buffer | ops_http_rollups (route × method × status × segment, minute + hour, latency histogram), ops_http_user_rollups (user × route per hour) |
| Outgoing calls | Laravel Http client events — every client, no per-integration code |
ops_outgoing_rollups (endpoint × method × status × outcome) |
| Jobs | queue events, one row per attempt (wait, origin, parent job, schedule run) | ops_job_runs |
| Schedule | scheduler events, incl. skipped runs and ->command() child processes |
ops_schedule_runs |
| Security | 401 / 403 / 404 / 419 / 429 per IP and user, failed logins | ops_signal_* (http.403, auth.failed, …) |
| Host signals | Ops::signal('cross_tenant', key: "user:{$id}", meta: ['tenant' => $slug]) |
ops_signal_rollups, ops_signal_values |
| Probes | Ops::probe('network', 'vpn', ProbeLevel::Critical, message: 'down') |
ops_probe_states |
A recorder never breaks the request or job it measures: every write is wrapped and fails silently. ops:rollup (every
minute) rolls each closed minute exactly once, ops:alerts (every minute, right after) evaluates the rules, and
ops:prune (daily) applies retention. All three are put on the scheduler for you.
Install
Requirements: Laravel 12 or 13, Inertia 2/3 with React, Tailwind v4, Redis 6.2+ for the buffer (OPS_BUFFER=array
keeps it in memory, for tests).
Migrations skip any table that already exists, so a host that built its own ops_* tables keeps its history.
Dashboard
/ops (config ops.path): Overview, Incoming, Outgoing, Jobs, Schedules, Incidents, Rules and Settings. Every screen
renders the published resources/js/pages/Ops.jsx, which you can edit to render inside your own layout:
Text is English or Thai (ops.locale, default app()->getLocale()).
Access
Local is always allowed. Elsewhere register a callback, or define a viewOps gate:
Alerts
Rules live in ops_rules and are edited on the Rules page. Types: threshold (count per key in a window, or distinct
values of a meta field), rate (one signal as a share of another), absence (silent for N seconds) and state (a probe
at warning / critical). An incident opens once per rule × key, re-notifies after the cooldown (at once when it
escalates), and resolves after the rule has been clear for a while. Built-in signals: job.run, job.failed,
schedule.run, schedule.failed, outgoing.call, outgoing.failed, http.user_route, http.{status}, auth.failed.
ops:install seeds starting rules (production only): 403 ≥ 20 and 429 ≥ 10 per IP/user in 5 minutes, cross-tenant
probing ≥ 3 distinct tenants in 10 minutes, failed logins, one user flooding one route, repeated job failures, and
scheduled task health.
A rule's Remind about warnings switch (remind_warnings) decides whether warning-level incidents get reminders.
Turn it off and a warning notifies when it opens and when it resolves, while critical incidents keep their reminders.
The seeded schedule-health rule has it off.
Schedule health
ops:alerts publishes each scheduled task's last 24 h as the schedule.health probe. The Schedules page shows the
same numbers. A task is failing (critical) when a run failed. It has missed runs (warning) when a cron tick had
no run or skip starting within 5 minutes after it. Three things keep that count honest:
- Changed schedules. Each cron expression is judged only from its first recorded run on that expression, so moving
dailyAt('01:06')todailyAt('03:30')doesn't count the new 03:30 tick as missed before it has ever run. - Deploys. Ticks within 5 minutes either side of a deploy in
ops_deploysare excused. During the cutover, cron can fire into a half-swapped release that records nothing. A deploy is recorded at the firstops:rollupon a new release (OPS_RELEASE,REVISIONor git HEAD), or when the deploy script runsphp artisan ops:deploy. - Maintenance mode. While the app is down,
schedule:rundrops tasks that aren'tevenInMaintenanceMode()without firing any event. Ops records those due ticks asskippedruns instead, so a longmigratebehindartisan downdoesn't read as missed. These rows come from the scheduler process itself, which makes them a more reliable signal than guessing the length of a deploy.
Channels are configured on the Settings page, each with a Send test button:
- Mail (on by default) — recipients, sender and one of your
config('mail.mailers'). - Slack — an incoming-webhook URL, stored encrypted.
- Your own:
Ops::channel('telegram', fn () => new TelegramChannel)implementingPhattarachai\OpsCore\Alerts\Contracts\IncidentChannel.
Host hooks
jobRunLinksUsing is called once per job page with the uuids of the runs on screen, so answer with one grouped query.
A job page opened with ?run=<uuid> highlights that run (all its attempts), adding it to the table when it is older than
the latest 30 — link back to it from your own logs.
Runtime settings (recorders on/off, ignore lists, retention, channels) are stored in ops_settings; a stored value wins
over the config/ops.php default of the same key.
Development
phattarachai/ops-core resolves from Packagist. To change core and this package together, point it at a sibling
checkout for that work, and don't commit the change: a committed path repository breaks Dependabot, which has no sibling.
Set versions to the version the constraint in composer.json needs.
License
MIT. See LICENSE.
ผู้พัฒนา
พัฒนาและดูแลโดย บริษัท ภัทรชัย อาร์ทิซาน จำกัด (Phattarachai Artisan) บริษัทที่ปรึกษาและพัฒนาเว็บ ที่เรียนรู้และแบ่งปันกับชุมชน Laravel แพ็กเกจนี้แบ่งปันให้ชุมชนนำไปใช้และต่อยอดได้อย่างอิสระ
ดูแพ็กเกจอื่นของเราได้ที่ phattarachai.dev/open-source และติดต่อเราได้ที่ phattarachai.dev
All versions of ops-laravel with dependencies
illuminate/cache Version ^12.0 || ^13.0
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/encryption Version ^12.0 || ^13.0
illuminate/events Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/mail Version ^12.0 || ^13.0
illuminate/queue Version ^12.0 || ^13.0
illuminate/redis Version ^12.0 || ^13.0
illuminate/routing Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
inertiajs/inertia-laravel Version ^2.0|^3.0
phattarachai/ops-core Version ^0.1.1