PHPackages                             mindtwo/server-monitoring - 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. mindtwo/server-monitoring

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

mindtwo/server-monitoring
=========================

Standalone server-level monitoring for the mindtwo monitoring suite: Docker, load and system metrics with cron push and a signed pull endpoint — no host application required.

00PHPCI passing

Since Jun 23Pushed 1mo agoCompare

[ Source](https://github.com/mindtwo/server-monitoring)[ Packagist](https://packagist.org/packages/mindtwo/server-monitoring)[ RSS](/packages/mindtwo-server-monitoring/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

mindtwo/server-monitoring
=========================

[](#mindtwoserver-monitoring)

[![Tests](https://github.com/mindtwo/server-monitoring/actions/workflows/tests.yml/badge.svg)](https://github.com/mindtwo/server-monitoring/actions/workflows/tests.yml)[![PHPStan Level 8](https://camo.githubusercontent.com/ff3c7f8c8667ce643f47e74532748f673482a5f95d7d4269f925f2eebbe5117e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e)](phpstan.neon.dist)[![PHP 8.0+](https://camo.githubusercontent.com/911a83e2aa6fe73660ab613629a95c76622bf03049a7344e80c5ea72d4ef9c7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e302d626c7565)](composer.json)[![License: MIT](https://camo.githubusercontent.com/be07a68b57a673af622198c336264f89d82bf4cd5d87bc0cb3f7b6ae47cc43ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c6967687467726579)](LICENSE.md)

Standalone server-level monitoring of the mindtwo suite — a self-contained PHP project that runs directly on a host, **no application integration required**. On top of [`mindtwo/base-monitoring`](https://github.com/mindtwo/base-monitoring) (OS, web server, database, Node.js, system stats, Composer/npm packages, audits, git) it adds:

- **Docker Engine** version detection,
- **load averages and uptime**,
- a tiny **CLI** (`bin/monitor`) for cron-driven pushes and local inspection,
- a single-file **pull endpoint** (`public/index.php`) serving signed snapshots at `GET /api/m2-monitoring`.

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

[](#installation)

```
git clone https://github.com/mindtwo/server-monitoring /opt/mindtwo/server-monitoring
cd /opt/mindtwo/server-monitoring
composer install --no-dev
cp .env.example .env   # add MONITORING_PROJECT_KEY + MONITORING_SECRET
```

### Scheduled push (cron)

[](#scheduled-push-cron)

```
0 3 * * * /usr/bin/php /opt/mindtwo/server-monitoring/bin/monitor push >> /opt/mindtwo/server-monitoring/storage/monitor.log 2>&1
```

Output is appended to `storage/monitor.log` inside the install directory, which the cron user already owns — no extra setup. To log to `/var/log` instead, create the file as root and hand it to the cron user first, otherwise the redirect fails with `Permission denied` and the push never runs:

```
sudo install -o "$USER" -g "$USER" -m 0644 /dev/null /var/log/mindtwo-monitoring.log
```

See [crontab.example](crontab.example).

### Pull endpoint (optional)

[](#pull-endpoint-optional)

Point a vhost/subdomain document root at `public/` — requests to `GET /api/m2-monitoring` are answered with the snapshot after IP allow-list, configuration and HMAC signature checks (same protocol as the whole suite: signature over `"{timestamp}.{raw body}"`, 300 s replay window).

CLI
---

[](#cli)

```
monitor push [--dry-run]      Build and deliver a snapshot (cron this daily)
monitor show                  Human-readable snapshot overview
monitor snapshot [--compact]  Print the snapshot JSON
monitor collectors            List collectors and their support status

```

Configuration (.env)
--------------------

[](#configuration-env)

Real environment variables always win over `.env` file values.

VariableDefaultPurpose`MONITORING_PROJECT_KEY`–Project key from the dashboard`MONITORING_SECRET`–Shared secret (never transmitted)`MONITORING_ENDPOINT`central endpointPush target`MONITORING_ENVIRONMENT``production`Reported environment`MONITORING_IP_ALLOW_LIST`–Comma-separated IPs / CIDR ranges for pull`MONITORING_ROUTE_ENABLED``true`Serve the pull endpoint`MONITORING_SIGNATURE_TOLERANCE``300`Signature timestamp window (seconds)`MONITORING_TIMEOUT``15`Push timeout (seconds)`MONITORING_PROJECT_ROOT`project dirWhere lockfiles/git are inspectedDevelopment
-----------

[](#development)

```
composer install
composer check    # pint --test + phpstan (level 8, PHP 8.0 mode) + pest
```

Security
--------

[](#security)

If you discover a security issue, please email instead of opening a public issue.

License
-------

[](#license)

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

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cc86fe6179314d204b14d1c81eb09a87ef84b0bcf2360dcd981171d1346c077?d=identicon)[mindtwo](/maintainers/mindtwo)

---

Top Contributors

[![jonasemde](https://avatars.githubusercontent.com/u/5083193?v=4)](https://github.com/jonasemde "jonasemde (6 commits)")

### Embed Badge

![Health badge](/badges/mindtwo-server-monitoring/health.svg)

```
[![Health](https://phpackages.com/badges/mindtwo-server-monitoring/health.svg)](https://phpackages.com/packages/mindtwo-server-monitoring)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B12.0k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

2041.5M292](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2428.5M361](/packages/open-telemetry-sdk)

PHPackages © 2026

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