pmill/rabbit-rabbit-statsd
Composer 安装命令:
composer require pmill/rabbit-rabbit-statsd
包简介
A StatsD integration for pmill/rabbit-rabbit
README 文档
README
Introduction
This library is an integration for pmill/rabbit-rabbit allows you to send your RabbitMQ message counts to StatsD.
Requirements
This library package requires PHP 7.1 or later, and a previously setup StatsD server.
Installation
The recommended way to install is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest version:
composer require pmill/rabbit-rabbit-statsd
Usage
The following example will post the message count for your queue to your StatsD metric. There is a complete example in
the examples/ folder.
$config = new RabbitConfig([ 'baseUrl' => 'localhost:15672', 'username' => 'guest', 'password' => 'guest', ]); $manager = new ConsumerManager($config); $vhostName = '/'; $queueName = 'messages'; $metric = 'message_queue_count'; $statsDClient = new StatsDClient(); $statsDClient->configure([ 'host' => '127.0.0.1', 'port' => 8125, 'namespace' => 'example' ]); $manager->addRule( new StatsDRule( $vhostName, $queueName, $statsDClient, $metric ), new GreaterThan(0) ); $manager->run();
Version History
0.1.1 (22/04/2018)
- Bugfix - Fixed metric name variable format
0.1.0 (18/04/2018)
- First public release of rabbit-rabbit-statsd
Copyright
pmill/rabbit-rabbit-statsd Copyright (c) 2018 pmill (dev.pmill@gmail.com) All rights reserved.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-18