PHPackages                             petrica/statsd-gearman - 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. petrica/statsd-gearman

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

petrica/statsd-gearman
======================

statsd gearman metrics collector in PHP

018PHP

Since Apr 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/petrica/php-statsd-gearman)[ Packagist](https://packagist.org/packages/petrica/statsd-gearman)[ RSS](/packages/petrica-statsd-gearman/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP statsd gearman metrics collector
====================================

[](#php-statsd-gearman-metrics-collector)

[![Build Status](https://camo.githubusercontent.com/10d5126713dc80b8bf6cc919ee440717dff41107c41a8e4b84142a816aad51a8/68747470733a2f2f7472617669732d63692e6f72672f706574726963612f7068702d7374617473642d676561726d616e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/petrica/php-statsd-gearman)

Gearman metrics collector for statsd written in PHP.

Install using composer:
-----------------------

[](#install-using-composer)

```
composer require petrica/statsd-gearman
```

Requirements:
-------------

[](#requirements)

- PHP ^5.5

Run with:
---------

[](#run-with)

```
vendor/bin/statsd-console statsd:notify --verbose gauges.yml
```

Please have a look at the main statsd library [here](https://github.com/petrica/php-statsd-system).

Sample config file:
-------------------

[](#sample-config-file)

The configuration file is pretty straightforward, you specify the gauge class name and class arguments

```
gauges:
    gearman:
        class: Petrica\StatsdGearman\Gauge\GearmanGauge
        arguments:
            server: localhost:4730
            timeout: 1
```

Where we have the following parameters:

**server** - Gearman server host and port

```
server: [host]:[port]

```

**timeout** - Connection timeout in seconds

```
timeout: [seconds]

```

Graphite
--------

[](#graphite)

Having statsd integrated with graphite, you will find gearman metrics under:

```
stats.gauges.system.gearman.[job_name].queue - number of jobs in queue
stats.gauges.system.gearman.[job_name].running - number of running workers
stats.gauges.system.gearman.[job_name].workers - number of available workers

```

Here is an example of how a graph might look like for all stats aggregated:

[![Gearman Stats](docs/gearman.jpg)](docs/gearman.jpg)

In this example we have 27 available workers, around 20 jobs in queue and around 7 active workers every 5 minutes. Of course this example doesn't tell much about gearman load, but tracking each job individually will get you enough information to know if you need to span additional workers in order to keep up with the flow of jobs.

Here is the graph URL:

```
/render?width=600&from=-24hours&until=now&height=300&target=aliasByNode(summarize(sumSeries(stats.gauges.system.gearman.*.queue)%2C%20%225minutes%22%2C%20%22avg%22%2C%20true)%2C5)&target=aliasByNode(summarize(sumSeries(stats.gauges.system.gearman.*.running)%2C%20%225minutes%22%2C%20%22avg%22%2C%20true)%2C5)&target=aliasByNode(summarize(sumSeries(stats.gauges.system.gearman.*.workers)%2C%20%225minutes%22%2C%20%22avg%22%2C%20true)%2C5)&title=Gearman%20Overall%20Load&vtitle=Count&_uniq=0.5637446563409128

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://avatars.githubusercontent.com/u/236869?v=4)[Petrică Martinescu](/maintainers/petrica)[@petrica](https://github.com/petrica)

### Embed Badge

![Health badge](/badges/petrica-statsd-gearman/health.svg)

```
[![Health](https://phpackages.com/badges/petrica-statsd-gearman/health.svg)](https://phpackages.com/packages/petrica-statsd-gearman)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M262](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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