Added Pagerduty basic alerting

This commit is contained in:
utkarshcmu
2016-10-28 22:19:51 -07:00
parent a100836bb4
commit 139bbecc10
4 changed files with 159 additions and 37 deletions

View File

@@ -90,6 +90,7 @@ export class AlertTabCtrl {
case "email": return "fa fa-envelope";
case "slack": return "fa fa-slack";
case "webhook": return "fa fa-cubes";
case "pagerduty": return "fa fa-bullhorn";
}
}

View File

@@ -19,7 +19,7 @@
<div class="gf-form">
<span class="gf-form-label width-12">Type</span>
<div class="gf-form-select-wrapper width-15">
<select class="gf-form-input" ng-model="ctrl.model.type" ng-options="t for t in ['webhook', 'email', 'slack']" ng-change="ctrl.typeChanged(notification, $index)">
<select class="gf-form-input" ng-model="ctrl.model.type" ng-options="t for t in ['webhook', 'email', 'slack', 'pagerduty']" ng-change="ctrl.typeChanged(notification, $index)">
</select>
</div>
</div>
@@ -97,6 +97,41 @@
</div>
</div>
<div class="gf-form-group" ng-if="ctrl.model.type === 'pagerduty'">
<h3 class="page-heading">Pagerduty settings</h3>
<div class="gf-form">
<span class="gf-form-label width-12">Integration Key</span>
<input type="text" required class="gf-form-input max-width-30" ng-model="ctrl.model.settings.integrationKey" placeholder="Pagerduty integeration Key"></input>
</div>
<div class="gf-form">
<gf-form-switch
class="gf-form"
label="Alert on No Data"
label-class="width-12"
checked="ctrl.model.settings.alertOnNoData"
tooltip="Trigger incident on No Data">
</gf-form-switch>
</div>
<div class="gf-form">
<gf-form-switch
class="gf-form"
label="Alert on Exec Error"
label-class="width-12"
checked="ctrl.model.settings.alertOnExecError"
tooltip="Trigger incident on Execution Error">
</gf-form-switch>
</div>
<div class="gf-form">
<gf-form-switch
class="gf-form"
label="Auto resolve on OK"
label-class="width-12"
checked="ctrl.model.settings.resolveOnOK"
tooltip="Resolve incident on OK">
</gf-form-switch>
</div>
</div>
<div class="gf-form-group">
<div class="gf-form-inline">
<div class="gf-form width-6">