PHPackages                             nawasara/database-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. [Database &amp; ORM](/categories/database)
4. /
5. nawasara/database-monitor

ActiveLibrary[Database &amp; ORM](/categories/database)

nawasara/database-monitor
=========================

MySQL/MariaDB server + database monitoring for the Nawasara superapp framework — inventory, capacity, performance, slow query, and alerting via a single read-only monitoring user.

v0.1.1(3w ago)01062MITPHPPHP ^8.1

Since May 26Pushed 3w agoCompare

[ Source](https://github.com/nawasara/database-monitor)[ Packagist](https://packagist.org/packages/nawasara/database-monitor)[ RSS](/packages/nawasara-database-monitor/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (17)Versions (3)Used By (2)

nawasara/database-monitor
=========================

[](#nawasaradatabase-monitor)

MySQL/MariaDB inventory, capacity, performance, and alert monitoring for the [Nawasara](https://github.com/nawasara) superapp framework.

Scoped to **one central MySQL server** (the Kominfo deployment baseline as of 2026-05-25) but the schema stays multi-server capable.

Phases
------

[](#phases)

PhaseScopeStatusAInventory + uptimescaffoldingBCapacity (DB size, top tables, growth)plannedCPerformance (processlist, slow query auto-detect, global status)plannedDBackup + replicationDROPPED — no replication, no standard backup tool yetEAlerts via `nawasara/notification`plannedFAdministration (CREATE/DROP DB, manage MySQL users)planned, separate PRSee [`docs/todo-database-monitor.md`](../../docs/todo-database-monitor.md) for the full plan.

Setup
-----

[](#setup)

### 1. Create the monitoring user on the target MySQL server

[](#1-create-the-monitoring-user-on-the-target-mysql-server)

```
CREATE USER 'nawasara_monitor'@'%' IDENTIFIED BY '';

GRANT SELECT, PROCESS, REPLICATION CLIENT, SHOW DATABASES, SHOW VIEW
    ON *.* TO 'nawasara_monitor'@'%';

FLUSH PRIVILEGES;
```

Restrict the host to your Nawasara container IP when possible:

```
CREATE USER 'nawasara_monitor'@'10.x.x.x' IDENTIFIED BY '';
```

Verify:

```
SHOW GRANTS FOR 'nawasara_monitor'@'%';
-- Must be exactly:
-- GRANT SELECT, PROCESS, REPLICATION CLIENT, SHOW DATABASES, SHOW VIEW ON *.* TO `nawasara_monitor`@`%`
```

The user is **read-only by design** — no `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `DROP`, or `GRANT` privileges. Phase F administration uses a separate, higher-privilege user (created when that phase ships).

### 2. Store credentials in Vault

[](#2-store-credentials-in-vault)

Open **Nawasara → Pengaturan → Vault → Database Monitor** and fill:

- **Host** — hostname or IP of the MySQL server
- **Port** — usually `3306`
- **Database** — leave blank (we connect server-wide, not per-DB)
- **Username** — `nawasara_monitor`
- **Password** — the strong password from step 1

Click **Test Connection** to verify.

### 3. Seed permissions

[](#3-seed-permissions)

```
php artisan db:seed --class="Nawasara\\DatabaseMonitor\\Database\\Seeders\\PermissionSeeder"
```

This creates the `database-monitor.*` permissions and grants them to the `developer` role (if present).

Privileges explained
--------------------

[](#privileges-explained)

GrantPurpose`SELECT ON *.*`Reads `information_schema` (sizes, table list), `performance_schema` (status, processlist), and `mysql.slow_log` (slow query, when enabled)`PROCESS`Required for `SHOW PROCESSLIST` to see all sessions, not just the monitor user's own`REPLICATION CLIENT``SHOW REPLICA STATUS` — granted defensively so replication monitoring works the day replication is enabled, without re-granting`SHOW DATABASES`Lists all schemas regardless of user permissions`SHOW VIEW`Reads view definitions for sizingRuntime connection — no `.env` leakage
--------------------------------------

[](#runtime-connection--no-env-leakage)

The package never registers `DATABASE_MONITOR_*` env vars or pushes anything into `config/database.php`. Connection config is built at runtime from Vault each time a job or page needs it, used, then **purged** to release the LAN socket. Defence-in-depth: every session runs with `SET SESSION TRANSACTION READ ONLY` regardless of the granted privileges.

License
-------

[](#license)

MIT.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance94

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity33

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.

###  Release Activity

Cadence

Every ~32 days

Total

2

Last Release

27d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16914951?v=4)[Pringgo J. Saputro](/maintainers/pringgojs)[@pringgojs](https://github.com/pringgojs)

![](https://www.gravatar.com/avatar/edcf770bde3babcc9fa554e305e361b8614c1e505470e75842de75ea3e502548?d=identicon)[nawasara](/maintainers/nawasara)

---

Top Contributors

[![pringgojs](https://avatars.githubusercontent.com/u/16914951?v=4)](https://github.com/pringgojs "pringgojs (3 commits)")

---

Tags

laravelmonitoringdatabasemysqlmariadbobservabilityNawasara

### Embed Badge

![Health badge](/badges/nawasara-database-monitor/health.svg)

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

###  Alternatives

[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

44611.3k](/packages/venturedrake-laravel-crm)

PHPackages © 2026

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