carlosio/pingdom
Composer 安装命令:
composer require carlosio/pingdom
包简介
A PHP library for dealing with the Pingdom REST API with multiaccount support
README 文档
README
CarlosIO\Pingdom is a Pingdom API written in PHP with multiaccount support. So, if you don't want to pay for a premium account, you can create free ones and integrate them using this API.
Features
All the Pingdom services are available at http://www.pingdom.com/services/api-documentation-rest
Here are the services you can use using this API:
Installation
The best way to install the library is by using Composer. Add the following to composer.json in the root of your project:
{ "require": { "carlosio/pingdom": "1.*" } }
Then, on the command line:
curl -s http://getcomposer.org/installer | php
php composer.phar install
Use the generated vendor/autoload.php file to autoload the library classes.
Usage
Usage is fairly straightforward. Here is an example:
<?php require_once __DIR__ . '/../vendor/autoload.php'; use CarlosIO\Pingdom\Account; use CarlosIO\Pingdom\Client; $client = new Client(); $client->addAccount(new Account('<user>', '<password>', '<token>')); // As an example... $checks = $client->getChecks(); foreach ($checks as /** @var \CarlosIO\Pingdom\Check $check */ $check) { echo $check->getName(), ' (', $check->getHostname(), ')', PHP_EOL; echo $check->getStatus(), ' ', $check->getLastResponseTime(), PHP_EOL; } $actions = $client->getActions(); foreach ($actions as /** @var \CarlosIO\Pingdom\Action $action */ $action) { echo $action->getMessageFull(), ' ', $action->getContactName(), ' ', $action->getVia(), PHP_EOL; } $contacts = $client->getContacts(); foreach ($contacts as /** @var \CarlosIO\Pingdom\Contact $contact */ $contact) { echo $contact->getName(), ' ', $contact->getEmail(), PHP_EOL; } $credits = $client->getCredits(); foreach ($credits as /** @var \CarlosIO\Pingdom\Credit $credit */ $credit) { echo $credit->getAvailableChecks(), PHP_EOL; } $probes = $client->getProbes(); foreach ($probes as /** @var \CarlosIO\Pingdom\Probe $probe */ $probe) { echo $probe->getCountry(), ' ', $probe->getIp(), PHP_EOL; } $serverTimes = $client->getServerTime(); foreach ($serverTimes as /** @var \CarlosIO\Pingdom\ServerTime $serverTime */ $serverTime) { echo $serverTime->getServerTime(), PHP_EOL; }
carlosio/pingdom 适用场景与选型建议
carlosio/pingdom 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51 次下载、GitHub Stars 达 5, 最近一次更新时间为 2012 年 07 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「pingdom」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 carlosio/pingdom 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 carlosio/pingdom 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 carlosio/pingdom 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
WPStartUp plugin does initial setup after WordPress installation. Create projects in Bugsnag and Pingdom.
Adds Uptime Page like from Pingdom into site's Dashboard.
Scrutiny checks over your environment to make sure your app is running as it should be – use Oh Dear or Pingdom to check it
A PHP library for dealing with the Pingdom REST API
Laravel based tool for interacting with Pingdom API
统计信息
- 总下载量: 51
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-07-14