Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

schnipseljagd/riemann-php-client

Repository files navigation

riemann-php-client

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%"']

About

A php client for the Riemann event system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages