schnipseljagd / riemann-php-client
A php client for the Riemann event system
Installs: 9 499
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 5
Open Issues: 2
Requires
- ebuzzing/thrift: dev-master
- rgooding/protobuf-php: dev-master
Requires (Dev)
- phpunit/phpunit: @stable
This package is not auto-updated.
Last update: 2022-02-01 12:27:28 UTC
README
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%"']