fittinq/symfony-opsgenie

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (2.0.1) of this package.

This package's canonical repository appears to be gone and the package has been frozen as a result.

2.0.1 2023-11-07 12:11 UTC

This package is auto-updated.

Last update: 2024-09-17 21:51:16 UTC


README

Introduction

Use symfony opsgenie to send alert messages if any error is thrown.

Table of Contents

Installation

composer require fittinq/symfony-opsgenie

Usage

  1. Create an instance of the Opsgenie class, providing it with the required dependencies: HttpClientInterface, OPSGENIE_HOST_URL, and the OPSGENIE_API_KEY.

     use Fittinq\Symfony\Opsgenie\Opsgenie;
     use Symfony\Contracts\HttpClient\HttpClientInterface;
        
     $httpClient = new HttpClient(); // Replace with your actual HttpClient instance.
     $opsgenie = new Opsgenie($httpClient, OPSGENIE_HOST_URL, OPSGENIE_API_KEY);
    
  2. You can now use the escalate method to send an alert to Opsgenie:

     $alertMessage = "This is an alert that needs attention!";
     $opsgenie->escalate($alertMessage);
    

Configuration

Add the following parameters to your environment
OPSGENIE_HOST_URL=
OPSGENIE_API_KEY=