GitXplorerGitXplorer
i

opsgenie-notification

public
3 stars
5 forks
7 issues

Commits

List of commits on branch master.
Verified
7337a356f253ea994321f5d835dcc3cf01219b07

Merge pull request #3 from hipyhop/close_alert_on_success

iiksaif committed 6 years ago
Unverified
698ad327f437be35d852f074407f6202141e7e08

Close matching open alerts on job success if enabled

hhipyhop committed 7 years ago
Unverified
35c595cd5347e5db5c0c248f9b071071045c59e0

Update to use v2 api endpoint.

hhipyhop committed 7 years ago
Unverified
e9a771072c237613dabf7bd02033edddc4be8a61

Add additional job variables to documentation

hhipyhop committed 7 years ago
Unverified
d8e2e26ed7ae2c0b74f7a9566125309992d7f216

Use the job.id as OpsGenie alias to support deduplication

hhipyhop committed 7 years ago
Unverified
4a547116d32b83a0be9369920526412d6a2b7952

Reformat code

committed 8 years ago

README

The README file for this repository.

Use this notification plugin to send alert events to your OpsGenie service.

The plugin requires one parameter:

  • subject: This string will be set as the description for the generated incident.

Context variables usable in the subject line:

  • ${job.id}: Job ID.
  • ${job.status}: Job execution status (eg, FAILED, SUCCESS).
  • ${job.project}: Job project name.
  • ${job.name}: Job name.
  • ${job.group}: Job group name.
  • ${job.username}: User that executed the job.
  • ${job.user.email}: Email address of user that executed the job.
  • ${job.execid}: Job execution ID.
  • ${job.retryAttempt}: Retry attempt number.
  • ${job.wasRetry}: True if execution is retry.

Installation

Copy the groovy script to the plugins directory:

cp src/OpsGenieNotification.groovy to $RDECK_BASE/libext

and start using it!

Configuration

The plugin only requires the 'api_key' configuration entry. There are also a few optional configurations.

  • api_key: This is the API Key to your service.

Configure the api_key in your project configuration by adding an entry like so: $RDECK_BASE/projects/{project}/etc/project.properties

project.plugin.Notification.OpsGenieNotification.api_key=xx123049e89dd45f28ce35467a08577yz

Or configure it at the instance level: $RDECK_BASE/etc/framework.properties

framework.plugin.Notification.OpsGenieNotification.api_key=xx123049e89dd45f28ce35467a08577yz

All options

Option Scope Default Required Description
api_key Any None Yes Integration API Key
message Any ${job.status} [${job.project}] \"${job.name}\" Yes Message template.
description Any ${job.status} [${job.project}] \"${job.name}\" run by ${job.user} (#${job.execid}) [${job.href}] No Description template.
alias Any ${job.id} No alias template.
source Any ${job.href} No Source template.
proxy_host Project None Yes Your egress proxy host.
proxy_port Project None If proxy_host is set the port the network egress proxy accepts traffic on.