drinks-it/monitoring

各种监控工具

1.1.1 2021-05-17 11:36 UTC

This package is auto-updated.

Last update: 2024-09-19 17:26:14 UTC


README

OPSGENIE_API_KEY 环境变量必须定义,否则会触发 '无法验证' 错误(安全失败,无异常)

用法

<?php

require_once __DIR__ . '/vendor/autoload.php';

$ops = new \Monitoring\Alert\Opsgenie();
$desc = <<< MSG
<strong>Alert H1</strong>
<a href="https://www.example.com">Click</a> here
Simple Text is also fine 
you can do some line brakes.
Like
this.
MSG;

var_dump($ops->raise("Alert subject", $desc));