tao-test/app/vendor/jtl-software/opsgenie-client/examples/pingHeartbeat.php

21 lines
677 B
PHP
Raw Normal View History

2022-08-29 20:14:13 +02:00
<?php
use JTL\OpsGenie\Client\Alert\Alert;
use JTL\OpsGenie\Client\Alert\CloseAlertRequest;
use JTL\OpsGenie\Client\Alert\CreateAlertRequest;
use JTL\OpsGenie\Client\Alert\GetAlertRequest;
use JTL\OpsGenie\Client\AlertApiClient;
use JTL\OpsGenie\Client\HeartbeatApiClient;
use JTL\OpsGenie\Client\HttpClient;
use JTL\OpsGenie\Client\Priority;
require_once __DIR__ . '/../vendor/autoload.php';
$token = "xxx-xxx-xxx";
$client = new HeartbeatApiClient(HttpClient::createForEUApi($token));
do {
$result = $client->sendPing(new JTL\OpsGenie\Client\Heartbeat\PingRequest('ea-ebay-workerDaemon'));
var_dump($result, $result->isSuccessful());
sleep(60);
} while(true);