vend / phanglia
该包已被废弃,不再维护。没有建议的替代包。
Ganglia 集成 PHP
1.2.0-rc1
2015-04-17 03:03 UTC
Requires
- php: >=5.4.0
- psr/log: 1.0.*
Requires (Dev)
- phpunit/phpunit: 4.1.*
This package is not auto-updated.
Last update: 2022-04-11 02:58:07 UTC
README
PHP 对 Ganglia 的绑定
一个小型库,用于生成并发送 Ganglia 监控的 GMetric 数据包。
使用方法
// Gets a metric definition $metric = new Phanglia\Metric('name', Ganglia::TYPE_STRING, Ganglia::SLOPE_UNSPECIFIED); // The metadata and value packets as binary strings, in case you want to send them yourself $meta = $metric->getMetadataPacket(); $value = $metric->getValuePacket('some value') // Sending them on to a Ganglia collector (default udp://127.0.0.1:8649) $socket = new Phanglia\Socket(); $socket->sendMetric($metric, 'some value');
安装
Phanglia 可以通过 composer 获取,包名为 vend/phanglia
。或者将 PSR-4 自动加载器指向 lib 目录。