vend/phanglia

This package is abandoned and no longer maintained. No replacement package was suggested.

Ganglia integration for PHP

1.2.0-rc1 2015-04-17 03:03 UTC

README

PHP bindings for Ganglia

A small library for producing and sending GMetric packets for Ganglia monitoring.

Build Status Scrutinizer Quality Score Code Coverage Latest Stable Version License

Usage

// Gets a metric definition
$metric = new Phanglia\Metric('name', Ganglia::TYPE_STRING, Ganglia::SLOPE_UNSPECIFIED);

// The metadata and value packets as binary strings, in case you want to send them yourself
$meta  = $metric->getMetadataPacket();
$value = $metric->getValuePacket('some value')

// Sending them on to a Ganglia collector (default udp://127.0.0.1:8649)
$socket = new Phanglia\Socket();
$socket->sendMetric($metric, 'some value');

Installation

Phanglia is available via composer, with a package name of vend/phanglia. Or point your PSR-4 autoloader at the lib directory.