trademachines / riemann-client-php
PHP Client for riemann
This package's canonical repository appears to be gone and the package has been frozen as a result.
1.2.0
2016-10-17 15:05 UTC
Requires
- php: >=5.5
- centraldesktop/protobuf-php: ~0.6.9
Requires (Dev)
- phpunit/phpunit: @stable
This package is not auto-updated.
Last update: 2024-01-20 14:26:16 UTC
README
Simple PHP client for Riemann
Usage
$socket = new UdpSocket('127.0.0.1', 5555); // To use a tcp socket: // $socket = new TcpSocket('127.0.0.1', 5555); $client = new Client($socket); $client->sendEvent([ 'host' => 'tm', 'service' => 'loader', 'metrics' => 1, 'attributes' => [ [ 'key' => 'source', 'value' => 'my source'], ] ]); // By default the data will be really send to riemann once 20 events have been queued // You can still send the data manually by calling: $client->flush(); // Or by changing the threshold: $client->setFlushAfter(5);
Installation
Composer
You can install this package with composer, simply add "trademachines/riemann-client-php" to your composer.json file.
{ "require": { "trademachines/riemann-client-php": "dev-master" } }
TODO
- UDP Packet size control