PHPackages                             magewatch/module-agent - 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. magewatch/module-agent

ActiveMagento2-module[Logging &amp; Monitoring](/categories/logging)

magewatch/module-agent
======================

Read-only monitoring agent for Magento 2 that collects health metrics and pushes them to the MageWatch SaaS API.

1.2.5(today)021↑30%OSL-3.0PHP ~8.1.0||~8.2.0||~8.3.0||~8.4.0

Since Jul 7Compare

[ Source](https://github.com/krivtsuna/magewatch-module-agent)[ Packagist](https://packagist.org/packages/magewatch/module-agent)[ Docs](https://magewatch.io/docs/install)[ RSS](/packages/magewatch-module-agent/feed)WikiDiscussions Synced today

READMEChangelogDependencies (16)Versions (19)Used By (0)

MageWatch Agent for Magento 2
=============================

[](#magewatch-agent-for-magento-2)

Read-only monitoring agent for **Magento 2.4.x** (Open Source or Adobe Commerce). A lightweight heartbeat runs every minute (paid) to confirm the store is alive; every five minutes it collects health metrics — indexers, cron, queues, order aggregates, log signals, system resources, and security hygiene — and pushes JSON to [MageWatch](https://magewatch.io) over HTTPS.

Packagist: [magewatch/module-agent](https://packagist.org/packages/magewatch/module-agent)

What it is
----------

[](#what-it-is)

The MageWatch agent runs inside your Magento store. It does not modify catalog, sales, or customer data. It reports operational signals so your agency dashboard can alert you when indexers stall, crons miss runs, queues back up, orders drop unexpectedly, or logs spike — before your client notices.

What it does NOT do
-------------------

[](#what-it-does-not-do)

- **Never writes** to catalog, sales, or customer tables — collectors are read-only.
- **No customer PII** — order data is hourly aggregates only (counts and revenue buckets), not individual orders or buyer details.
- **No remote code execution** — the agent only pushes JSON over HTTPS to your MageWatch ingest endpoint. There is no inbound control channel.
- **Open source** — every collector is plain PHP under `Model/Collector/`. Inspect the code before you install on production.

Install
-------

[](#install)

From your Magento project root:

```
composer require magewatch/module-agent
bin/magento setup:upgrade
```

Then in Magento admin: **Stores → Configuration → MageWatch → Agent** — paste the site token from your MageWatch dashboard and set the ingest URL (production: `https://magewatch.io/api/v1/ingest`).

Full step-by-step guide: [magewatch.io/docs/install](https://magewatch.io/docs/install)

Architecture and payload schema: [docs/AGENT.md](docs/AGENT.md) (maintainers).

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

[](#requirements)

- Magento **2.4.x** (tested on 2.4.6+)
- PHP **8.1**, **8.2**, or **8.3**
- Outbound **HTTPS** to your MageWatch API host (e.g. `api.magewatch.io` or your self-hosted ingest URL)
- Magento cron running (agent uses the `magewatch` cron group)

Useful commands
---------------

[](#useful-commands)

```
bin/magento magewatch:status    # last run, enabled collectors, ingest URL
bin/magento magewatch:send      # send heartbeat now (respects schedule)
bin/magento magewatch:send --force
```

Frontend monitoring (RUM)
-------------------------

[](#frontend-monitoring-rum)

From **v1.1.0**, the agent can inject a tiny storefront script (paid MageWatch plans) that reports JS errors, funnel activity counters, and Web Vitals to MageWatch. The script loads from `https://magewatch.io/rum/v1.js` — logic lives on the SaaS so fixes do not require module releases.

- **Toggle:** Stores → Configuration → MageWatch → Agent → Frontend monitoring (RUM) (default ON).
- **Keys:** `rum_public_key` is synced automatically via remote config — never paste it manually.
- **What it collects:** sanitized JS error messages, add-to-cart/checkout/success counters, LCP/CLS/INP — no cookies, no PII, no session IDs.
- **Disable:** set Frontend monitoring to No — removes injection without uninstalling the agent.

Security collector (v1.2.0)
---------------------------

[](#security-collector-v120)

The agent whitelists legitimate Magento `pub/` PHP files and compares content hashes against `vendor/magento/magento2-base` when available. `pub/cron.php` and other core files no longer false-positive as unexpected PHP; modified core files emit `core_pub_php_modified`. Deploy fingerprints (`static_version`, `composer_lock_hash`) are included in heartbeats for SaaS deploy correlation.

See [CHANGELOG.md](CHANGELOG.md) for release history.

Uninstall
---------

[](#uninstall)

```
bin/magento module:disable MageWatch_Agent
composer remove magewatch/module-agent
bin/magento setup:upgrade
```

Data &amp; privacy
------------------

[](#data--privacy)

What the agent collects, how long MageWatch retains it, and DPA terms for agencies:

[magewatch.io/data](https://magewatch.io/data)

License
-------

[](#license)

OSL-3.0 — see [LICENSE](LICENSE).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance100

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity55

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

Total

18

Last Release

0d ago

PHP version history (2 changes)1.0.0PHP ~8.1.0||~8.2.0||~8.3.0

1.2.2PHP ~8.1.0||~8.2.0||~8.3.0||~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/53fee9be45d95944a2555126e4a73d6fa460477f3db81c0d27f10a65f69cfa38?d=identicon)[magewatch](/maintainers/magewatch)

---

Tags

monitoringmagentocronsaasindexermagento2magewatch

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/magewatch-module-agent/health.svg)

```
[![Health](https://phpackages.com/badges/magewatch-module-agent/health.svg)](https://phpackages.com/packages/magewatch-module-agent)
```

###  Alternatives

[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8064.7M49](/packages/smile-elasticsuite)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

1310.9k2](/packages/opengento-module-category-import-export)

PHPackages © 2026

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