Giter Club home page Giter Club logo

opsgenie-notification's Introduction

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.

opsgenie-notification's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opsgenie-notification's Issues

Rundeck v3 compatibility?

Is this plugin compatible with Rundeck version 3.2.0? I have installed it but when a job fails the notification to OpsGenie also fails. This is the error:
[2019-12-27 07:30:10.740] ERROR NotificationService --- [eduler_Worker-7] Error sending notification: Notification{eventTrigger='onfailure', type='OpsGenieNotification', content='{"source":"${job.href}","message":"${job.status} [${job.project}] \"${job.name} \"","alias":"${job.id}","description":"${job.status} [${job.project}] \"${job.name}\" run by ${job.user} (#${job.execid}) [ ${job.href} ]"}'}: class groovy.lang.MissingPropertyException: No such property: system for class: OpsGenieNotification

Opsgenie new API compatibility

Hello,

Has anyone gotten this to work, or have a fork or something that accounts for the syntax changes in the Opsgenie API? I believe the request to the alert API in Opsgenie takes different arguments now, so this code as it currently is , will not work. Have not had any success modifying the groovy file with the updated argument structure .

Thanks

Incident Urgency

I do not see an option to change the urgency. it keeps defaulting to low

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.