Skip to content

Minimal Ruby API wrapper for the OpsGenie API

License

Notifications You must be signed in to change notification settings

kopokopo/oops_genie

 
 

Repository files navigation

OopsGenie

This is a minimal gem that integrates to the OpsGenie API specification. Right now only OpsGenie Alerts are implemented. More functionality will follow later.

Usage

Create an OopsGenieAlert Object minimally providing your OpsGenie api key and a message.

alert = OopsGenie::OopsGenieAlert.new('your api key here', 'Testing Alerts')
alert.send_alert

Additionally you can set other configuration parameters to the alert object before sending. eg.

alert = OopsGenie::OopsGenieAlert.new('your api key here', 'Testing Alerts')
alert.tags = ['Critical', 'Another tag']
alert.priority = 'P1'
alert.send_alert

In the host application, ensure there is configuration file in config/opsgenie.yml in the format below:

development:
  endpoint: opsgenie-url
  api_key: opsgenie-api-key

production:
  endpoint: opsgenie-url
  api_key: opsgenie-api-key

Attributes that can be set on the alert oject are:

  • api_key
  • message
  • alias
  • actions
  • tags
  • details
  • entity
  • priority
  • responders

See the OpsGenie API for more information on these.

Installation

Add this line to your application's Gemfile:

gem 'oops_genie'

And then execute:

$ bundle

Or install it yourself as:

$ gem install oops_genie

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

About

Minimal Ruby API wrapper for the OpsGenie API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%