PHP code example of signiant / victoropsnotifier
1. Go to this page and download the library: Download signiant/victoropsnotifier library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
signiant / victoropsnotifier example snippets
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);
use Signiant\VictorOps\Messages\CustomMessage;
$voMsg = new CustomMessage('INFO');
$voMsg->stateMessage('Hello VictorOps');
$voMsg->entityId('system123');
$voMsg->entityDisplayName('HAL 9000');