Repository is archived
No commit activity in last 3 years
No release in over 3 years
Set and remove alert silencing schedules aka maintenance windows
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 0.2.1
~> 10.3.2
~> 3.1.0
~> 0.41.2
~> 1.0.4
~> 2.9.3
~> 1.18.0

Runtime

~> 1.0.1
~> 0.13.1
 Project Readme

UNMAINTAINED

This project is not maintained anymore. If you want to take over contact us at tech@cargomedia.ch.

Copperegg::Alerts Build Status

Minimalistic API client to manipulate Copperegg's alert schedules aka Maintenance Mode

Installation

Add this line to your application's Gemfile:

gem 'copperegg-alerts'

Usage

see http://dev.copperegg.com/alerts/schedules.html for verbs and arguments

require 'copperegg'

# Set up client

Copperegg::Alerts::Client.instance.auth_setup(API_KEY)
schedule = Copperegg::Alerts::Schedule.new

# Create a new alert schedule (maintenance mode)
# 
# Arguments:
# title - A name for the alert schedule
# [<arg1>[..<argN>] - Any argument from 'The Alert Schedule Hash' 
# see http://dev.copperegg.com/alerts/schedules.html for verbs and arguments

schedule.create('spec_test',
  'match' => {'tag' => ['foo', 'foo-bar']}, 
  'state' => 'enabled', 
  'duration' => 7, 
  'start_time' => '2014-09-14T10:21:40Z'
)

schedule.update('spec_test',
  'state' => 'disabled'
)

schedule.destroy('spec_test')