Ejemplo n.º 1
0
 /**
  * Ctor
  * 
  * When $autoIncidentKey is true it auto-generates an `incident_key` based on $description.
  * The incident_key is an md5 hash of the $description. This prevents
  * PagerDuty from flooding admins with incidents that are essentially the same.
  * 
  * @param string $serviceKey
  * @param string $description
  * @param bool $autoIncidentKey (Opt) - Default: false
  */
 public function __construct($serviceKey, $description, $autoIncidentKey = false)
 {
     parent::__construct($serviceKey, 'trigger');
     $this->setDescription($description);
     $this->autoIncidentKey = (bool) $autoIncidentKey;
 }
Ejemplo n.º 2
0
 public function testResolveSendHit()
 {
     $evt = new Event();
     $evt->setApiUrl('test');
     $evt->setServiceKey('12345678901234567890123456789012');
     $evt->setIncidentKey('ikey');
     $evt->resolve();
 }