lafourchette/pager-duty-bundle

There is no license information available for the latest version (v0.1.2) of this package.

Trigger PagerDuty events easily from your Symfony2 application.

v0.1.2 2015-04-23 15:18 UTC

This package is not auto-updated.

Last update: 2021-10-02 01:29:01 UTC


README

Build Status Code Coverage Scrutinizer Code Quality

Trigger PagerDuty events easily from your Symfony2 application.

A simple example

In your config.yml file:

la_fourchette_pager_duty:
    services:
        my_service_alias: {key: "the 32 char GUID provided by PagerDuty"}

You'll find the service GUID at https://<your subdomain>.pagerduty.com/services

Then somewhere in your code where something really bad happens:

$event = $this->get('la_fourchette_pager_duty.factory.event')
    ->make("my_service_alias", "something bad happened");

// @throw PagerDuty\EventException if PagerDuty API 500s
$event->trigger();

LiipMonitor compatibility

If you're using liip/monitor-bundle, you're provided a "pagerduty" reporter which triggers PagerDuty on failures. You're just required to implement the Check/PagerDutyCheckInterface.

# Trigger pager duty on failed checks
app/console monitor:health --reporter=pagerduty

Installation

First, add PagerDutyBundle to the list of dependencies inside your composer.json:

{
    "require-dev": {
        "lafourchette/pager-duty-bundle": "~0.1"
    }
}

Then update your AppKernel.php:

    public function registerBundles()
    {
        $bundles = array(
            ...
            new LaFourchette\PagerDutyBundle\LaFourchettePagerDutyBundle()
            ...
        );

        return $bundles;
    }