schnipseljagd/riemann-php-client

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

A php client for the Riemann event system

dev-master 2013-09-28 11:10 UTC

This package is not auto-updated.

Last update: 2019-02-20 17:36:01 UTC


README

Build Status

http://riemann.io/quickstart.html

Uses thrift socket transport atm, but there is no real need for this dependency.

example client

use Riemann\Client;

require __DIR__ . '/vendor/autoload.php';

$riemannClient = Client::create('localhost', 5555);

$eventBuilder = $riemannClient->getEventBuilder();
$eventBuilder->setService("php stuff");
$eventBuilder->setMetric(mt_rand(0, 99));
$eventBuilder->addTag('histogram');
$eventBuilder->sendEvent();

$eventBuilder = $riemannClient->getEventBuilder();
$eventBuilder->setService("php stuff2");
$eventBuilder->setMetric(mt_rand(99, 199));
$eventBuilder->addTag('meter');
$eventBuilder->sendEvent();

$riemannClient->flush();

query the events:

$ irb -r riemann/client
ruby-1.9.3 :001 > r = Riemann::Client.new
 => #<Riemann::Client ... >
ruby-1.9.3 :003 > r['service =~ "php%"']