PHPackages                             matowens/webpage-monitor - 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. matowens/webpage-monitor

ActiveLibrary

matowens/webpage-monitor
========================

Laravel package for saved webpage monitors, scheduled checks, change detection, and state-aware mail notifications.

v1.0.1(yesterday)00MITPHP ^8.3

Since Jul 12Compare

[ Source](https://github.com/matowens/webpage-monitor)[ Packagist](https://packagist.org/packages/matowens/webpage-monitor)[ RSS](/packages/matowens-webpage-monitor/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (15)Versions (3)Used By (0)

Webpage Monitor
===============

[](#webpage-monitor)

Webpage Monitor is a Laravel package for checking public webpages, saving monitors, running scheduled checks, extracting selector content, detecting selector changes, and sending state-aware mail notifications.

It supports three monitor types:

- availability
- contains
- selector

This package is the extracted reusable monitoring capability behind the Rivetworks host application.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 13
- `ext-dom`
- A database supported by Laravel

Installation
------------

[](#installation)

Install the package from Composer:

```
composer require matowens/webpage-monitor
```

Laravel package discovery will register the service provider automatically.

Configuration
-------------

[](#configuration)

Publish the package configuration if you want to override the defaults:

```
php artisan vendor:publish --tag=webpage-monitor-config
```

Current configuration covers:

- HTTP request timeout
- default user agent
- notification enablement
- mail recipient list
- baseline, recovery, and lifecycle notification toggles
- selector-change content truncation for displayed mail content

Migrations
----------

[](#migrations)

The package loads its migrations automatically during `php artisan migrate`.

If you prefer copied migration files in your application, publish them with:

```
php artisan vendor:publish --tag=webpage-monitor-migrations
```

Then run:

```
php artisan migrate
```

Commands
--------

[](#commands)

### One-off check

[](#one-off-check)

```
php artisan webpage-monitor:check https://example.com
php artisan webpage-monitor:check https://example.com --contains="Example Domain"
php artisan webpage-monitor:check https://example.com --selector="h1"
```

This command performs a single fetch and reports:

- requested URL
- reachability
- HTTP status when available
- duration in milliseconds
- body size in bytes
- failure message for transport failures

Selector mode also reports:

- selector
- match count
- normalized selected content from the first match
- SHA-256 hash of the normalized content

### Saved monitors

[](#saved-monitors)

Create a monitor:

```
php artisan webpage-monitor:create "Homepage" https://example.com
php artisan webpage-monitor:create "Homepage Text" https://example.com --contains="Example Domain"
php artisan webpage-monitor:create "Homepage Heading" https://example.com --selector="h1"
php artisan webpage-monitor:create "Scheduled Homepage" https://example.com --every=15
```

Run a saved monitor manually:

```
php artisan webpage-monitor:run 1
```

Run due monitors:

```
php artisan webpage-monitor:run-due
```

Enable, disable, or delete a monitor:

```
php artisan webpage-monitor:enable 1
php artisan webpage-monitor:disable 1
php artisan webpage-monitor:delete 1
```

Scheduler Setup
---------------

[](#scheduler-setup)

Register the scheduler in your application so `webpage-monitor:run-due` runs every minute.

This package expects the host application to own scheduler registration. Rivetworks does this in `routes/console.php`.

Queue Modes
-----------

[](#queue-modes)

### Minimal synchronous mode

[](#minimal-synchronous-mode)

Set:

```
QUEUE_CONNECTION=sync
```

In this mode the same scheduled-monitor job executes immediately inside the scheduler process. This is useful for simple environments without a persistent worker.

### Asynchronous worker mode

[](#asynchronous-worker-mode)

Set:

```
QUEUE_CONNECTION=database
```

Then run a queue worker, for example:

```
php artisan queue:work database --queue=default --sleep=1 --max-jobs=100 --max-time=3600
```

This mode is recommended for continuous scheduled monitoring.

### Worker restart after changes

[](#worker-restart-after-changes)

Queue workers are long-running processes. After deployments or local package class changes, restart them so they reload the current Composer autoloader and package classes:

```
php artisan queue:restart
```

If your worker runs in a container or supervisor-managed process, make sure that process actually restarts after Laravel receives the restart signal.

Notification Behavior
---------------------

[](#notification-behavior)

Mail is the only notification channel in v1.

Recipients are configured at the package level, not per monitor.

Supported notifications:

- baseline established
- became unavailable
- recovered from unavailable
- contains assertion failed
- contains assertion recovered
- selector content changed
- monitor disabled
- monitor deleted

Behavior notes:

- availability and contains baselines are established from the first completed check
- selector baseline is established only after the first successful selector extraction
- selector extraction failures do not establish a selector baseline
- selector extraction failures do not emit failure or recovery notifications in v1
- notifications are deduplicated from persisted state transitions, not from every run
- notification delivery failures do not roll back completed checks or schedule advancement

Current Limitations
-------------------

[](#current-limitations)

Version 1 does not include:

- browser rendering or JavaScript execution
- CAPTCHA or bot-protection bypassing
- proxy support
- retention or pruning commands
- monitor inspection commands
- per-monitor recipients
- Slack, SMS, Discord, webhook, or push notifications
- UI dashboards or public routes

Testing
-------

[](#testing)

Run package tests from inside the package repository:

```
composer install
vendor/bin/pest
vendor/bin/pint --test
```

New Project Notice
------------------

[](#new-project-notice)

This is a focused v1 package extracted from a working application. Review the code, tests, configuration, and operational behavior carefully before using it in production. It is provided without warranty.

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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 ~6 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e420798fffea1299a3e200738320d067af780dab49e08ff492a24b90fe99a45?d=identicon)[matowens](/maintainers/matowens)

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/matowens-webpage-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/matowens-webpage-monitor/health.svg)](https://phpackages.com/packages/matowens-webpage-monitor)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k96.5k1](/packages/mike-bronner-laravel-model-caching)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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