lafourchette / pager-duty-bundle
Trigger PagerDuty events easily from your Symfony2 application.
Installs: 23 808
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 44
Forks: 1
Open Issues: 0
Requires
- nmcquay/pagerduty: 0.1.*
- symfony/console: >=2.0 <2.2
- symfony/framework-bundle: >=2.0 <2.2
Requires (Dev)
- phpspec/prophecy: ~1.0
- phpunit/phpunit: ~4.6
This package is not auto-updated.
Last update: 2021-10-02 01:29:01 UTC
README
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; }