snide/zf-redmon

Zend Framework 2 Redis monitoring Module

dev-master 2013-05-27 14:40 UTC

This package is not auto-updated.

Last update: 2024-11-18 15:35:57 UTC


README

Redis monitoring module for ZF2

Installation

Using composer

{
    "require": {
        "snide/zf-redmon": "dev-master"
    }
}

Add module in your applcation.config.php

<?php

return array(
    // This should be an array of module namespaces used in the application.
    'modules' => array(
        'Application',
        'SnideRedmon',
        ...

Symlink public module subfolders into yourApp/public/modules/snide_redmon

Dependencies

  • doctrine/doctrine-orm-module
  • predis/predis

Configuration

You can choose between doctrine repository or file repository To do this, add some parameters in your application's config file

Doctrine

'snide_redmon' => array(
    'repository' => array(
        'type' => 'doctrine'
    ),
)

File

'snide_redmon' => array(
    'repository' => array(
        'dir'  => 'your/specific/folder',
        'type' => 'file'
    )
)

Batch

To log Redis instance information, a cli tool is available :

php public/index.php snide-redmon log

You can change log's retention (Default = 30 days):

'snide_redmon' => array(
    'logger' => array(
        'nb_days' => 10
    )
)