jtl-software/opsgenie-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jtl-software/opsgenie-client

最新稳定版本:3.0.0

Composer 安装命令:

composer create-project jtl-software/opsgenie-client

包简介

README 文档

README

Build Status

PHP implementation to connect to OpsGenie Alert API. The implementation is focused on what we require @JTL for our application Alerting.

https://docs.opsgenie.com/docs/alert-api

Features

  • Create Alert
  • Get specific Alert (by alias) from API
  • Close Alert
  • Ping Heatbeat

How-To-Use

Create / Get / Close Alert

# named constructor to create a client (for EU)
$client = AlertApiClient::createForEUApi(getenv(UPSGENIE_TOKEN));

$alert = new Alert('eazyauction', 'test-alert', 'foo mag bär', 'beer-bar');
$response = $client->createAlert($alert);

if($response->isSuccessful()){
  
    // read our former created alert
    $alert = $client->getAlert(new GetAlertRequest($alert->getAlias()));

    // close our former created alert
    $client->closeAlert(new CloseAlertRequest($alert->getAlias()));
}

Ping Heartbeat

$token = "xxx-xxx-xxx";
$client = new HeartbeatApiClient(HttpClient::createForEUApi(getenv(UPSGENIE_TOKEN)));
do {
    $result = $client->sendPing(new PingRequest('beat'));
    var_dump($result, $result->isSuccessful());
    sleep(60);
} while(true);

统计信息

  • 总下载量: 141.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-11-29