2017 © Pedro Peláez
 

library collector

Collector is the component in charge of subscribing to the channel where stats and events are published. Message storing policies are determined by matching type or a regexp defined in the config file.

image

ofertix/collector

Collector is the component in charge of subscribing to the channel where stats and events are published. Message storing policies are determined by matching type or a regexp defined in the config file.

  • Sunday, July 8, 2012
  • by jordillonch
  • Repository
  • 7 Watchers
  • 5 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

What is "Collector"?

Collector is the component in charge of subscribing to the channel where stats and events are published. Message storing policies are determined by matching type or a regexp defined in the config file., (*1)

You can configure:, (*2)

  • Your stats types, adding operations: counter, median, percentile 95, min, max, etc., (*3)

  • Retention:, (*4)

    • History time (N days), (*5)

    • Sample (N seconds or N minutes or N hours), (*6)

Also "Collector" offers a JSON API to query stored stats (used by WebUIStats component)., (*7)

Requirements

  • PHP 5.3.2 and up with pcntl extension installed.
  • RabbitMQ or ZMQ.
  • MongoDB

Libraries and services used

  • PHP
    • Pimple
    • Silex
    • Symfony Components:
      • ClassLoader
      • YAML
      • Console
    • PhpAmqpLib
    • Monolog
  • MongoDB
  • RabbitMQ/ZMQ+OpenPGM

Installation

The best way to install is to clone the repository and then configure as you need. See "Configuration" section., (*8)

After cloning you must install dependencies using "composer":, (*9)

php composer.phar update

Usage

Start collector server:, (*10)

php app/collector.php -c app/config/stats_test.yml

Configuration

All configuration is done using a YAML file., (*11)

Config file is structured in 4 sections:, (*12)

  • storage:, (*13)

    • class name in charge of process and store messages.
  • output:, (*14)

    • storage name configured to get data to the JSON API.
  • channel:, (*15)

    • class name that subscribe to the channel to get messages.
  • stats:, (*16)

    • stat types definition. Assign some operations and retention time.
    • config can be defined by type or by a regexp

See config file for more details and examples., (*17)

Extra notes

Use of ZMQ is discontinued because a memory leak using ZMQ with OpenPGM PUB/SUB., (*18)

The Versions

08/07 2012

dev-master

9999999-dev https://github.com/ofertix/Collector

Collector is the component in charge of subscribing to the channel where stats and events are published. Message storing policies are determined by matching type or a regexp defined in the config file.

  Sources   Download

MIT

The Requires

 

by Jordi Llonch
by Joan Valduvieco

log logging collector monitor monitoring