badpixxel/paddock-mongodb

Paddock - Mongodb Extension

Maintainers

Package info

gitlab.com/paddock-project/paddock-mongodb

Type:bundle

pkg:composer/badpixxel/paddock-mongodb

Transparency log

Statistics

Installs: 4 784

Dependents: 1

Suggesters: 0

Stars: 0

4.0.0 2026-07-20 15:58 UTC

This package is auto-updated.

Last update: 2026-07-20 14:04:10 UTC


README

Paddock extension for monitoring MongoDb servers: version, server variables, and databases statistics, via Doctrine MongoDB ODM connections.

Requirements

  • PHP 8.1+ with ext-mongodb
  • badpixxel/paddock-core ^5.0 (Symfony 5.4 → 8.x)
  • doctrine/mongodb-odm-bundle ^4.7|^5.0
VersionPHPPaddock CoreStatus
5.x^8.1^5.0Active
4.x^7.44.xMaintenance

Installation

composer require badpixxel/paddock-mongodb

Configure the connection via the MONGODB_URL environment variable:

MONGODB_URL="mongodb://user:password@my-server.com:27017/mydb"

Available Collectors

CodeCollected Data
mongodb-versionMongoDb server version
mongodb-variableMongoDb server variables (serverStatus)
mongodb-statsDatabases statistics (objects, dataSize, indexes)

A ready-to-use health check track (mongodb-health-checker) is registered automatically as soon as MONGODB_URL is defined.

Usage Example

tracks:

    my-mongodb-checks:
        collector:      "mongodb-version"
        description:    "Check MongoDb Server"
        rules:
            version:        { rule: version, gte: { error: "6.0" } }

More examples in tests/Tracks/ and src/Tracks/MongoDbHealthChecker.php.

Development & Tests

All checks run identically in CI and locally: the GitLab pipeline executes the exact same commands as the docker containers (one per Symfony version, 5.4 → 8.x), with a mongo:7.0 service alongside:

# Start all containers & run everything (composer, quality, tests)
make verify

# Run PhpUnit tests in all containers
make test

# Quality suites (GrumPHP: lint, code style, PhpStan)
php vendor/bin/grumphp run --testsuite=travis
php vendor/bin/grumphp run --testsuite=csfixer
php vendor/bin/grumphp run --testsuite=phpstan

# PhpUnit testsuites
vendor/bin/phpunit --testsuite=integration
vendor/bin/phpunit --testsuite=operational

License

Paddock is released under the MIT License.