PHPackages                             ofertix/collector - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. ofertix/collector

ActiveLibrary[Queues &amp; Workers](/categories/queues)

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.

523PHP

Since Jul 8Pushed 13y ago7 watchersCompare

[ Source](https://github.com/ofertix/Collector)[ Packagist](https://packagist.org/packages/ofertix/collector)[ RSS](/packages/ofertix-collector/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

What is "Collector"?
====================

[](#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.

You can configure:

- Your stats types, adding operations: counter, median, percentile 95, min, max, etc.
- Retention:

    - History time (N days)
    - Sample (N seconds or N minutes or N hours)

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

Requirements
============

[](#requirements)

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

Libraries and services used
===========================

[](#libraries-and-services-used)

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

Installation
============

[](#installation)

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

After cloning you must install dependencies using "composer":

```
php composer.phar update

```

Usage
=====

[](#usage)

Start collector server:

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

```

Configuration
=============

[](#configuration)

All configuration is done using a YAML file.

Config file is structured in 4 sections:

- storage:

    - class name in charge of process and store messages.
- output:

    - storage name configured to get data to the JSON API.
- channel:

    - class name that subscribe to the channel to get messages.
- stats:

    - 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.

Extra notes
===========

[](#extra-notes)

Use of ZMQ is discontinued because a memory leak using ZMQ with OpenPGM PUB/SUB.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/6b35088a631c9044fd825de62ac37394798506dc06b91ece08811b74bb29ce3c?d=identicon)[jordillonch](/maintainers/jordillonch)

---

Top Contributors

[![jvalduvieco](https://avatars.githubusercontent.com/u/700067?v=4)](https://github.com/jvalduvieco "jvalduvieco (1 commits)")

### Embed Badge

![Health badge](/badges/ofertix-collector/health.svg)

```
[![Health](https://phpackages.com/badges/ofertix-collector/health.svg)](https://phpackages.com/packages/ofertix-collector)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M171](/packages/react-async)

PHPackages © 2026

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