Buyerquest Opsgenie Ruby gem
This gem provides opsgenie related functionality
Installation
Add this line to your application's Gemfile:
gem 'buyerquest-opsgenie'And then execute:
$ bundle installOr install it directly:
$ gem install buyerquest-opsgenieUsage
Alert creation
Example:
require 'buyerquest/opsgenie'
# Initialise client singleton
Buyerquest::Opsgenie::Client.init 'your-api-key-here'
# alternatively export OPSG_API_KEY to the runtime environment and then call without any arguments:
# Buyerquest::Opsgenie::Client.init
# Prepare alert object instance
test_alert = Buyerquest::Opsgenie::Alert.new(message: "I'm an alert from the buyerquest-opsgenie gem",
alias: 'no-duplication',
description: 'buyerquest-opsgenie gem alert')
# Fire alert
test_alert.createHeartbeat usage
require 'buyerquest/opsgenie'
# Initialise client singleton
Buyerquest::Opsgenie::Client.init 'your-api-key-here'
# alternatively export OPSG_API_KEY to the runtime environment and then call without any arguments:
# Buyerquest::Opsgenie::Client.init
# Prepare alert object instance
test_heartbeat = Buyerquest::Opsgenie::Heartbeat.new(name: 'Test heartbeat')
# Start heartbeat
test_heartbeat.startTesting
Run rake spec to start the test suite.