laravel-notification-channels/pagerduty
Composer 安装命令:
composer require laravel-notification-channels/pagerduty
包简介
A Laravel notification channel for sending PagerDuty events.
README 文档
README
This package makes it easy to send notification events to PagerDuty with Laravel 11.x+
Contents
Installation
You can install the package via composer:
composer require laravel-notification-channels/pagerduty
Usage
Now you can use the channel in your via() method inside the Notification class.
use NotificationChannels\PagerDuty\PagerDutyChannel; use NotificationChannels\PagerDuty\PagerDutyMessage; use Illuminate\Notifications\Notification; class SiteProblem extends Notification { public function via($notifiable) { return [PagerDutyChannel::class]; } public function toPagerDuty($notifiable) { return PagerDutyMessage::create() ->setSummary('There was an error with your site in the {$notifiable->service} component.'); } }
In order to let your Notification know which Integration should receive the event, add the routeNotificationForPagerDuty method to your Notifiable model.
This method needs to return the Integration Key for the service and integration to which you want to send the event.
public function routeNotificationForPagerDuty() { return '99dc10c97a6e43c387bbc4f877c794ef'; }
PagerDuty Setup
On a PagerDuty Service of your choice, create a new Integration using the Events API v2.
The Integration Key listed for your new integration is what you need to set in the routeNotificationForPagerDuty() method.
Available Message methods
resolve(): Sets the event type toresolveto resolve issues.setDedupKey(''): Sets thededup_key(required when resolving).setSummary(''): Sets a summary message on the event.setSource(''): Sets the event source; defaults to thehostname.setSeverity(''): Sets the event severity; defaults tocritical.setTimestamp(''): Sets thetimestampof the event.setComponent(''): Sets thecomponentof the event.setGroup(''): Sets thegroupof the event.setClass(''): Sets theclass.addCustomDetail('', ''): Adds a key/value pair to thecustom_detailof the event.
See the PagerDuty v2 Events API documentation for more information about what these options will do.
Usage
Notification::route('PagerDuty', '[my integration key]')->notify(new BasicNotification);
When using Notification::route be sure to reference 'PagerDuty' as the Channel.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email lwaite@gmail.com instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
laravel-notification-channels/pagerduty 适用场景与选型建议
laravel-notification-channels/pagerduty 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33.09k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2017 年 05 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「notifications」 「laravel」 「alerting」 「PagerDuty」 「laravel-package」 「notification-channel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 laravel-notification-channels/pagerduty 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 laravel-notification-channels/pagerduty 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 laravel-notification-channels/pagerduty 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova package that adds a notification feed in your Nova app.
A profiling/monitoring Symfony2 bundle for production servers - alerts on exceptions, logs profiling data & sends data to statsd/graphite
A Laravel notification channel for sending PagerDuty events.
Queue monitoring and observability for Laravel. Tracks job lifecycle, retries, failures and a dead-letter queue across all queue drivers (Redis, SQS, database, sync), with failure fingerprinting, scheduled-task monitoring, worker heartbeats, duration-anomaly detection and alerts (Slack, mail, PagerD
Captures outgoing SMS notifications
A Laravel package for logging and reporting debug information with full stacktrace to multiple channels.
统计信息
- 总下载量: 33.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 10
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-12

