PHPackages                             ofertix/log-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ofertix/log-monitor

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

ofertix/log-monitor
===================

LogMonitor is a component in charge of parse all kind of log files and publishes errors and stats to the configured channel.

2073PHP

Since Jul 8Pushed 13y ago10 watchersCompare

[ Source](https://github.com/ofertix/LogMonitor)[ Packagist](https://packagist.org/packages/ofertix/log-monitor)[ RSS](/packages/ofertix-log-monitor/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

What is "LogMonitor"?
=====================

[](#what-is-logmonitor)

LogMonitor is the component in charge of parse all kind of log files and publishes errors and stats to the configured channel. The published messages could be collected by the "Collector" component or the "WebUIMonitor" component.

Files are parsed using `tail -f` command. Every line is sent to the configured class and then parsed data is sent to configured actor classes that can publish events, stats, errors, etc.

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

[](#requirements)

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

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

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

- PHP
    - Pimple
    - Symfony Components:
        - ClassLoader
        - YAML
    - PhpAmqpLib
- 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 monitoring. Examples:

```
rm -f test/*.sdf; php app/log_monitor.php -c app/config/test_upstream_log.yml

```

- As you can see, before execute the command we delete \*.sdf files. These files contain information about the last position the reader had in the monitored file.
- Use test/listenRabbitMQ.php to see what is published by the parser.

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

[](#configuration)

All configuration is done using a YAML file.

Config file is structured in one or more sections named as you want. Every section has 4 subsections:

- file:

    - path to file that will be parsed and monitored.
- file\_stat:

    - path where to write position data from monitored file.
- parser:

    - class name in charge of parsing the file.
- actors:

    - list of actor classes that receive parsed data and do actions defined in the class code.
- actor\_config:

    - config parameters passed to actor classes.

See config file for more details and examples.

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

[](#extra-notes)

We detect if a monitored file is rotated using "atime" parameter from stats. You must mount your file system using "noatime" parameter in /etc/fstab.

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

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-log-monitor/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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