signiant/victoropsnotifier 问题修复 & 功能扩展

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

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

signiant/victoropsnotifier

最新稳定版本:0.3.0

Composer 安装命令:

composer require signiant/victoropsnotifier

包简介

REST API integration for VictorOps

README 文档

README

PHP module to send notification messages to VictorOps via the REST integration.

Installing

Via Composer

composer require signiant/victoropsnotifier
composer update

Usage

Example of basic usage with suplied classes

<?php
require_once 'vendor/autoload.php';

use Signiant\VictorOps\Notifier;
use Signiant\VictorOps\Messages\CustomMessage;

// Only the message level is mandatory
$voMsg = new Signiant\VictorOps\Messages\CustomMessage('INFO');

$voConfig = ['endpoint_url' => 'YOUR_VO_REST_ENDPOINT', 'routing_key' => 'YOUR_VO_ROUTING_KEY'];
$voEndpoint = new Signiant\VictorOps\Notifier($voConfig);
$voEndpoint->send(voMsg);

Customise the message

The supplied CustomMessage class details the optional parameters that can be sent as part of the request. These parameters allow you to customise the message.

  1. Entity ID
  2. Entity Display Name
  3. State Message
  4. ACK Message
  5. ACK Author
  6. Entity Is Host Setting
<?php

use Signiant\VictorOps\Messages\CustomMessage;

$voMsg = new CustomMessage('INFO');

$voMsg->stateMessage('Hello VictorOps');

$voMsg->entityId('system123');

$voMsg->entityDisplayName('HAL 9000');


统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-24