deckard 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -2
- data/lib/deckard/util.rb +8 -6
- metadata +3 -2
data/README
CHANGED
@@ -36,10 +36,10 @@ On Call document format:
|
|
36
36
|
{
|
37
37
|
"_id": "on_call_person",
|
38
38
|
"sms_email": "8675309@jenny.net"
|
39
|
-
"
|
39
|
+
"notifo_usernames" : ["jenny"]
|
40
40
|
}
|
41
41
|
|
42
|
-
For sms_email you will need to put in the phone number and sms to email host for your phone provider. Provide both an sms email and notifo username and the sms will be only used for backup if something should go wrong with notifo. Saves you money on your text message bill! *You need the notifo application on your phone to use the notifo support.
|
42
|
+
For sms_email you will need to put in the phone number and sms to email host for your phone provider. Provide both an sms email and notifo username(s) and the sms will be only used for backup if something should go wrong with notifo. Saves you money on your text message bill! *You need the notifo application on your phone to use the notifo support. Note that notifo_usernames is an array of usernames so multiple people can get notifications.
|
43
43
|
|
44
44
|
|
45
45
|
Failover check document format:
|
data/lib/deckard/util.rb
CHANGED
@@ -49,9 +49,9 @@ class Deckard
|
|
49
49
|
Deckard::Log.info(log)
|
50
50
|
elsif priority == 2
|
51
51
|
begin
|
52
|
-
if on_call_contacts.has_key?("
|
53
|
-
Deckard::Log.info("sending notifo alert to #{on_call_contacts["
|
54
|
-
send_notifo(on_call_contacts["
|
52
|
+
if on_call_contacts.has_key?("notifo_usernames")
|
53
|
+
Deckard::Log.info("sending notifo alert to #{on_call_contacts["notifo_usernames"]}")
|
54
|
+
send_notifo(on_call_contacts["notifo_usernames"], subject, url)
|
55
55
|
Deckard::Log.info(log)
|
56
56
|
else
|
57
57
|
Deckard::Log.info("sending email alert to #{email_to} and sms to #{on_call_contacts["sms_email"]}")
|
@@ -104,10 +104,12 @@ class Deckard
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
def self.send_notifo(
|
107
|
+
def self.send_notifo(usernames, subject, url)
|
108
108
|
notifo = Notifo.new(Deckard::Config.notifo_user, Deckard::Config.notifo_apikey)
|
109
|
-
|
110
|
-
|
109
|
+
usernames.each do |username|
|
110
|
+
response = notifo.post(username, subject, "deckard alert", url)
|
111
|
+
Deckard::Log.info("Notifo response: #{response}")
|
112
|
+
end
|
111
113
|
end
|
112
114
|
|
113
115
|
def self.schedule(schedule)
|
metadata
CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
|
8
|
+
- 1
|
9
|
+
version: 0.5.1
|
9
10
|
platform: ruby
|
10
11
|
authors:
|
11
12
|
- joe williams
|
@@ -13,7 +14,7 @@ autorequire:
|
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|
15
16
|
|
16
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-13 00:00:00 -07:00
|
17
18
|
default_executable:
|
18
19
|
dependencies:
|
19
20
|
- !ruby/object:Gem::Dependency
|