giraffi 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.yardopts +7 -0
- data/Gemfile +10 -0
- data/HISTORY.md +6 -0
- data/LICENSE.md +20 -0
- data/README.md +114 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/examples/setup_http_monitoring.rb +88 -0
- data/giraffi.gemspec +155 -0
- data/lib/giraffi/client/applogs.rb +25 -0
- data/lib/giraffi/client/axions.rb +96 -0
- data/lib/giraffi/client/items.rb +102 -0
- data/lib/giraffi/client/logs.rb +23 -0
- data/lib/giraffi/client/media.rb +67 -0
- data/lib/giraffi/client/monitoringdata.rb +25 -0
- data/lib/giraffi/client/my_current_status.rb +19 -0
- data/lib/giraffi/client/regions.rb +15 -0
- data/lib/giraffi/client/services.rb +97 -0
- data/lib/giraffi/client/trends.rb +25 -0
- data/lib/giraffi/client/triggers.rb +94 -0
- data/lib/giraffi/client.rb +73 -0
- data/lib/giraffi/config.rb +60 -0
- data/lib/giraffi/version.rb +3 -0
- data/lib/giraffi.rb +26 -0
- data/test/applogs_test.rb +55 -0
- data/test/axions_test.rb +149 -0
- data/test/client_test.rb +52 -0
- data/test/fixtures/add_applogs_success_response.json +3 -0
- data/test/fixtures/add_monitroingdata.json +1 -0
- data/test/fixtures/add_service_to_item.json +12 -0
- data/test/fixtures/add_trigger_to_service.json +1 -0
- data/test/fixtures/create_axion.json +1 -0
- data/test/fixtures/create_item.json +15 -0
- data/test/fixtures/create_medium.json +1 -0
- data/test/fixtures/find_applogs_with_no_param.json +11 -0
- data/test/fixtures/find_applogs_with_params.json +2 -0
- data/test/fixtures/find_average_trends.json +6 -0
- data/test/fixtures/find_axion_by_id.json +9 -0
- data/test/fixtures/find_axion_by_trigger.json +11 -0
- data/test/fixtures/find_axion_logs_with_no_param.json +6 -0
- data/test/fixtures/find_axion_logs_with_params.json +5 -0
- data/test/fixtures/find_axions_by_trigger_with_axionkind.json +1 -0
- data/test/fixtures/find_axions_by_trigger_without_axionkind.json +1 -0
- data/test/fixtures/find_axions_with_no_param.json +1 -0
- data/test/fixtures/find_axions_with_params.json +11 -0
- data/test/fixtures/find_failure_trends.json +1 -0
- data/test/fixtures/find_item_by_id.json +15 -0
- data/test/fixtures/find_items_with_no_param.json +77 -0
- data/test/fixtures/find_items_with_params.json +17 -0
- data/test/fixtures/find_media_by_axion.json +13 -0
- data/test/fixtures/find_media_with_no_param.json +22 -0
- data/test/fixtures/find_media_with_params.json +1 -0
- data/test/fixtures/find_medium_by_id.json +1 -0
- data/test/fixtures/find_monitoringdata_with_no_param.json +4 -0
- data/test/fixtures/find_monitoringdata_with_params.json +3 -0
- data/test/fixtures/find_region_by_service.json +1 -0
- data/test/fixtures/find_regions.json +1 -0
- data/test/fixtures/find_service_by_id.json +12 -0
- data/test/fixtures/find_service_by_item_with_params.json +14 -0
- data/test/fixtures/find_services_by_item_with_no_param.json +14 -0
- data/test/fixtures/find_services_with_no_param.json +38 -0
- data/test/fixtures/find_services_with_params.json +14 -0
- data/test/fixtures/find_trigger_by_id.json +12 -0
- data/test/fixtures/find_triggers_by_service.json +1 -0
- data/test/fixtures/find_triggers_with_no_param.json +34 -0
- data/test/fixtures/find_triggers_with_params.json +14 -0
- data/test/fixtures/my_current_status_about_fake_uri.json +6 -0
- data/test/fixtures/my_current_status_about_real_uri.json +6 -0
- data/test/giraffi_test.rb +14 -0
- data/test/items_test.rb +170 -0
- data/test/logs_test.rb +60 -0
- data/test/media_test.rb +104 -0
- data/test/monitoringdata_test.rb +53 -0
- data/test/my_current_status_test.rb +29 -0
- data/test/regions_test.rb +20 -0
- data/test/services_test.rb +166 -0
- data/test/test_helper.rb +40 -0
- data/test/trends_test.rb +35 -0
- data/test/triggers_test.rb +151 -0
- metadata +271 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
class ApplogsTest < Test::Unit::TestCase
|
5
|
+
|
6
|
+
context "Testing Giraffi Ruby Gem for the Giraffi RESTful" do
|
7
|
+
setup do
|
8
|
+
@applog_attrs = {
|
9
|
+
:level => "error",
|
10
|
+
:type => "app",
|
11
|
+
:time => "1323318027.9443982",
|
12
|
+
:message => "Internal Server Error 500"
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'about the API related to the applogs' do
|
17
|
+
should 'return successfully all applogs without no param' do
|
18
|
+
stub_request(:get, "#{Giraffi.endpoint}/applogs.json?apikey=#{apikey}").
|
19
|
+
with(headers: Giraffi.request_headers).
|
20
|
+
to_return(body: fixture("find_applogs_with_no_param.json"))
|
21
|
+
|
22
|
+
giraffi = Giraffi.new({apikey: apikey})
|
23
|
+
response = giraffi.find_applogs
|
24
|
+
assert response.ok?
|
25
|
+
assert_equal JSON.parse(response.body).size, 8
|
26
|
+
assert_equal JSON.parse(response.body)[0]['applog']['time'], 1317782732.9443982
|
27
|
+
end
|
28
|
+
|
29
|
+
should 'return successfully the applogs with params' do
|
30
|
+
stub_request(:get, "#{Giraffi.endpoint}/applogs.json?apikey=#{apikey}").
|
31
|
+
with(query: {level: "error"}, headers: Giraffi.request_headers).
|
32
|
+
to_return(body: fixture("find_applogs_with_params.json"))
|
33
|
+
|
34
|
+
giraffi = Giraffi.new({apikey: apikey})
|
35
|
+
response = giraffi.find_applogs({level: "error"})
|
36
|
+
assert response.ok?
|
37
|
+
assert_equal JSON.parse(response.body).size, 1
|
38
|
+
assert_equal JSON.parse(response.body)[0]['applog']['level'], 'error'
|
39
|
+
end
|
40
|
+
|
41
|
+
should 'add successfully the applogs to the Giraffi' do
|
42
|
+
stub_request(:post, "#{Giraffi.applogs_endpoint}/applogs.json?apikey=#{apikey}").
|
43
|
+
with(body: MultiJson.encode({applog: @applog_attrs}), headers: Giraffi.request_headers).
|
44
|
+
to_return(status: 200, body: fixture("add_applogs_success_response.json"))
|
45
|
+
|
46
|
+
giraffi = Giraffi.new({apikey: apikey})
|
47
|
+
response = giraffi.add_applogs(@applog_attrs)
|
48
|
+
assert response.ok?
|
49
|
+
assert_equal JSON.parse(response.body).size, 1
|
50
|
+
assert_equal JSON.parse(response.body)['status'], 'Success to logging'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
data/test/axions_test.rb
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AxionsTest < Test::Unit::TestCase
|
4
|
+
context "Testing Giraffi Ruby Gem for the Giraffi RESTful" do
|
5
|
+
setup do
|
6
|
+
@medium_id = '522'
|
7
|
+
@axion_id = '425'
|
8
|
+
|
9
|
+
@axion_attrs = {
|
10
|
+
:name => "Alerting",
|
11
|
+
:axiontype => "messaging"
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'about the API related to the axions' do
|
16
|
+
should 'return successfully the desired axions with no param' do
|
17
|
+
stub_request(:get, "#{Giraffi.endpoint}/axions.json?apikey=#{apikey}").
|
18
|
+
with(headers: Giraffi.request_headers).
|
19
|
+
to_return(body: fixture("find_axions_with_no_param.json"))
|
20
|
+
|
21
|
+
giraffi = Giraffi.new({apikey: apikey})
|
22
|
+
response = giraffi.find_axions
|
23
|
+
assert response.ok?
|
24
|
+
assert_equal JSON.parse(response.body).size, 4
|
25
|
+
assert_equal JSON.parse(response.body)[0]['axion']['axiontype'], "http_request"
|
26
|
+
end
|
27
|
+
|
28
|
+
should 'return successfully the desired axions with params' do
|
29
|
+
stub_request(:get, "#{Giraffi.endpoint}/axions.json?apikey=#{apikey}").
|
30
|
+
with(query: {axiontype: "messaging"}, headers: Giraffi.request_headers).
|
31
|
+
to_return(body: fixture("find_axions_with_params.json"))
|
32
|
+
|
33
|
+
giraffi = Giraffi.new({apikey: apikey})
|
34
|
+
response = giraffi.find_axions({axiontype: "messaging"})
|
35
|
+
assert response.ok?
|
36
|
+
assert_equal JSON.parse(response.body).size, 1
|
37
|
+
assert_equal JSON.parse(response.body)[0]['axion']['axiontype'], "messaging"
|
38
|
+
end
|
39
|
+
|
40
|
+
should 'return successfully the desired axion by the numerical ID' do
|
41
|
+
stub_request(:get, "#{Giraffi.endpoint}/axions/#{@axion_id}.json?apikey=#{apikey}").
|
42
|
+
with(headers: Giraffi.request_headers).
|
43
|
+
to_return(body: fixture("find_axion_by_id.json"))
|
44
|
+
|
45
|
+
giraffi = Giraffi.new({apikey: apikey})
|
46
|
+
response = giraffi.find_axion(@axion_id)
|
47
|
+
assert response.ok?
|
48
|
+
assert_equal JSON.parse(response.body)['axion']['id'], @axion_id.to_i
|
49
|
+
end
|
50
|
+
|
51
|
+
should 'return successfully the media related to the axion' do
|
52
|
+
stub_request(:get, "#{Giraffi.endpoint}/axions/#{@axion_id}/media.json?apikey=#{apikey}").
|
53
|
+
with(:query => {name: "Tweat"}, headers: Giraffi.request_headers).
|
54
|
+
to_return(body: fixture("find_media_by_axion.json"))
|
55
|
+
|
56
|
+
giraffi = Giraffi.new({apikey: apikey})
|
57
|
+
response = giraffi.find_media_by_axion(@axion_id, {name: "Tweat"})
|
58
|
+
assert response.ok?
|
59
|
+
assert_equal JSON.parse(response.body)[0]['medium']['name'], "Tweat"
|
60
|
+
end
|
61
|
+
|
62
|
+
should 'create successfully a new axion' do
|
63
|
+
stub_request(:post, "#{Giraffi.endpoint}/axions.json?apikey=#{apikey}").
|
64
|
+
with(:query => {:axion => @axion_attrs}, headers: Giraffi.request_headers).
|
65
|
+
to_return(status: 201, body: fixture("create_axion.json"))
|
66
|
+
|
67
|
+
giraffi = Giraffi.new({apikey: apikey})
|
68
|
+
response = giraffi.create_axion(@axion_attrs)
|
69
|
+
assert_equal response.code, 201
|
70
|
+
assert_equal JSON.parse(response.body)['axion']['axiontype'], 'messaging'
|
71
|
+
end
|
72
|
+
|
73
|
+
should 'execute successfully the desired axion' do
|
74
|
+
stub_request(:post, "#{Giraffi.endpoint}/axions/#{@axion_id}/execute.json?apikey=#{apikey}").
|
75
|
+
with(headers: Giraffi.request_headers).
|
76
|
+
to_return(body: "\"OK\"")
|
77
|
+
|
78
|
+
giraffi = Giraffi.new({apikey: apikey})
|
79
|
+
response = giraffi.execute_axion(@axion_id)
|
80
|
+
assert response.ok?
|
81
|
+
assert_equal response.body, "\"OK\""
|
82
|
+
end
|
83
|
+
|
84
|
+
should 'update successfully the desired axion' do
|
85
|
+
stub_request(:put, "#{Giraffi.endpoint}/axions/#{@axion_id}.json?apikey=#{apikey}").
|
86
|
+
with(:body => {}, :query => {:axion => {:name => "Alerting Neo"}}, headers: Giraffi.request_headers).
|
87
|
+
to_return(body: {})
|
88
|
+
giraffi = Giraffi.new({apikey: apikey})
|
89
|
+
response = giraffi.update_axion(@axion_id, {:name => "Alerting Neo"})
|
90
|
+
assert response.ok?
|
91
|
+
assert response.body == {}
|
92
|
+
end
|
93
|
+
|
94
|
+
should 'add successfully the medium to the desired axion' do
|
95
|
+
stub_request(:put, "#{Giraffi.endpoint}/axions/#{@axion_id}/media/#{@medium_id}.json?apikey=#{apikey}").
|
96
|
+
with(:body => {}, headers: Giraffi.request_headers).
|
97
|
+
to_return(:status => 200, :body => {})
|
98
|
+
|
99
|
+
giraffi = Giraffi.new({apikey: apikey})
|
100
|
+
response = giraffi.add_medium_to_axion(@axion_id, @medium_id)
|
101
|
+
assert response.ok?
|
102
|
+
assert response.body == {}
|
103
|
+
assert_nothing_raised ArgumentError do
|
104
|
+
giraffi.add_medium_to_axion(@axion_id, @medium_id)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
should 'raise an error when the number of arguments for `add_medium_to_axion` is not 2' do
|
109
|
+
giraffi = Giraffi.new({apikey: apikey})
|
110
|
+
assert_raise ArgumentError do
|
111
|
+
giraffi.add_medium_to_axion(@axion_id)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
should 'delete successfully the axion' do
|
116
|
+
stub_request(:delete, "#{Giraffi.endpoint}/axions/#{@axion_id}?apikey=#{apikey}").
|
117
|
+
with(headers: Giraffi.request_headers).
|
118
|
+
to_return(status: 200, body: {})
|
119
|
+
|
120
|
+
giraffi = Giraffi.new({apikey: apikey})
|
121
|
+
response = giraffi.destroy_axion(@axion_id)
|
122
|
+
assert response.ok?
|
123
|
+
assert response.body == {}
|
124
|
+
end
|
125
|
+
|
126
|
+
should 'remove successfully a medium from the axion' do
|
127
|
+
stub_request(:delete, "#{Giraffi.endpoint}/axions/#{@axion_id}/media/#{@medium_id}.json?apikey=#{apikey}").
|
128
|
+
with(headers: Giraffi.request_headers).
|
129
|
+
to_return(status: 200, body: {})
|
130
|
+
|
131
|
+
giraffi = Giraffi.new({apikey: apikey})
|
132
|
+
response = giraffi.remove_medium_from_axion(@axion_id, @medium_id)
|
133
|
+
assert response.ok?
|
134
|
+
assert response.body == {}
|
135
|
+
assert_nothing_raised ArgumentError do
|
136
|
+
giraffi.remove_medium_from_axion(@axion_id, @medium_id)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
should 'raise an error when the number of argumenrs `remove_medium_from_axion` is not 2' do
|
141
|
+
giraffi = Giraffi.new({apikey: apikey})
|
142
|
+
assert_raise ArgumentError do
|
143
|
+
giraffi.remove_medium_from_axion(@axion_id)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
end
|
data/test/client_test.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ClientTest < Test::Unit::TestCase
|
4
|
+
context 'Testing the Ruby Gem for the Giraffi RESTful API' do
|
5
|
+
setup do
|
6
|
+
@keys = Giraffi::Config::VALID_OPTIONS_KEYS
|
7
|
+
@configuration = {
|
8
|
+
:request_headers => {
|
9
|
+
"User-Agent" => "OreOre Ruby Gem",
|
10
|
+
"Accept" => "application/json",
|
11
|
+
"Content-Type" => "application/json"
|
12
|
+
},
|
13
|
+
:endpoint => "http://tumblr.com/",
|
14
|
+
:monitoringdata_endpoint => "http://google.com/",
|
15
|
+
:applogs_endpoint => "http://twitter.com",
|
16
|
+
:apikey => "test-key"
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
context 'about the class `client`' do
|
21
|
+
should 'override module configuration' do
|
22
|
+
giraffi = Giraffi.new(@configuration)
|
23
|
+
@keys.each do |key|
|
24
|
+
assert_equal giraffi.send(key), @configuration[key]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
should 'override module configuration after initialization' do
|
29
|
+
giraffi = Giraffi.new
|
30
|
+
@configuration.each do |key, value|
|
31
|
+
giraffi.send("#{key}=", value)
|
32
|
+
end
|
33
|
+
@keys.each do |key|
|
34
|
+
assert_equal giraffi.send(key), @configuration[key]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
should 'return the URI with the valid symbol given to `to_uri`' do
|
39
|
+
giraffi = Giraffi.new
|
40
|
+
uri = giraffi.to_uri(:papi)
|
41
|
+
assert_not_nil uri
|
42
|
+
assert_equal uri, 'https://papi.giraffi.jp'
|
43
|
+
end
|
44
|
+
|
45
|
+
should 'return nil with the invalid symbol given to `to_uri`' do
|
46
|
+
giraffi = Giraffi.new
|
47
|
+
uri = giraffi.to_uri(:foo)
|
48
|
+
assert_nil uri
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"_id":"4ee05e1c2005893ce1158764","alert":false,"checked_at":1323326945,"compared_at":1323327004,"created_at":1323327004,"job_id":"c85eed00-0396-012f-6bef-5254000ab9a8","region":"internal","service_id":17972,"servicetype":"load_average","tags":["26cfa4e2-e493-44d7-8322-4f03b467b412"],"threshold":[],"user_id":726,"value":20.0}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"trigger":{"axioninterval":180,"id":1151,"level":0,"options":{"time":"3"},"service_id":17972,"triggertype":"timeout"}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"axion":{"axiontype":"messaging","id":425,"name":"Alerting","options":{},"user_id":726}}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"item":{
|
3
|
+
"allowcopy":true,
|
4
|
+
"customkey":"6f76d596-e4c7-4b54-9afb-e2615c42d1aa",
|
5
|
+
"host":"",
|
6
|
+
"id":4089,
|
7
|
+
"ip":"127.0.0.59",
|
8
|
+
"name":"Locus Solus",
|
9
|
+
"normalinterval":300,
|
10
|
+
"status":2,
|
11
|
+
"user_id":726,
|
12
|
+
"warninginterval":180,
|
13
|
+
"warningretry":5
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"medium":{"id":526,"mediumtype":"twitter","name":"Tweats what happened","options":{},"user_id":726}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
[
|
2
|
+
{"applog":{"id":"4edd79d463051f073200002e","type":"app","level":"info","time":1317782732.9443982,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}},
|
3
|
+
{"applog":{"id":"4ed87abd63051f0754000014","type":"app","level":"info","time":1317782732.9443982,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}},
|
4
|
+
{"applog":{"id":"4ed879d92005892b8d00015b","type":"app","level":"info","time":1317782732.9443982,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}},
|
5
|
+
{"applog":{"id":"4ed876e82005892b7f00011f","type":"app","level":"error","time":1322809064.0197775,"message":"Internal Server Error 500"}},
|
6
|
+
{"applog":{"id":"4ed8732a2005892b730001d2","type":"app","level":"info","time":1317782732.9443982,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}},
|
7
|
+
{"applog":{"id":"4ed8727b63051f0730000006","type":"app","level":"info","time":1317782732.9443982,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}},
|
8
|
+
{"applog":{"id":"4ed872762005892b9300017c","type":"app","level":"info","time":1317782732.9443982,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}},
|
9
|
+
{"applog":{"id":"4ed86f4163051f074100000a","type":"app","level":"info","time":1317898443.020834,"message":"Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.3ms)"}}
|
10
|
+
]
|
11
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
[
|
2
|
+
{"checked_at":1319328000.0,"value":13.135,"max":13.135,"min":13.135},
|
3
|
+
{"checked_at":1319328000.0,"value":13.208000000000002,"max":13.208,"min":13.208},
|
4
|
+
{"checked_at":1319500800.0,"value":13.135,"max":13.135,"min":13.135},
|
5
|
+
{"checked_at":1319500800.0,"value":13.208000000000002,"max":13.208,"min":13.208}
|
6
|
+
]
|
@@ -0,0 +1,6 @@
|
|
1
|
+
[
|
2
|
+
{"_id":"4edf0f3463051f062b000001","axion_id":422,"axion_name":"Post message to the Convore","axion_options":{"uri":"https://convore.com/api/topics/19099/messages/create.json","method":"post","header":{"content-type":"application/x-www-form-urlencoded","Authorization":"Basic ****"},"body":{"message":"Post message by API"}},"checked_at":1323241268,"created_at":1323241268,"executed_at":1323241268,"medium_name":[],"result":500,"user_id":726},
|
3
|
+
{"_id":"4ee01c022325b409b10018f0","axion_id":425,"axion_name":"Alerting Neo","axion_options":{},"checked_at":1323310082,"created_at":1323310082,"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412","executed_at":1323310082,"host":null,"ip":"127.0.0.27","item_name":"f4edede0-f719-012e-b8e4-002590346596","medium_name":["Tweat"],"result":true,"service_id":17972,"service_options":{},"servicetype":"ping","trigger_id":1150,"trigger_options":{"time":"3"},"triggertype":"timeout","user_id":726},
|
4
|
+
{"_id":"4ee01dca63051f07910008a5","axion_id":425,"axion_name":"Alerting Neo","axion_options":{},"checked_at":1323310538,"created_at":1323310538,"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412","executed_at":1323310538,"host":null,"ip":"127.0.0.27","item_name":"f4edede0-f719-012e-b8e4-002590346596","medium_name":["Tweat"],"result":true,"service_id":17972,"service_options":{},"servicetype":"ping","trigger_id":1150,"trigger_options":{"time":"3"},"triggertype":"timeout","user_id":726},
|
5
|
+
{"_id":"4ee01dfa2325b409b600191f","axion_id":425,"axion_name":"AlertingNeo","axion_options":{},"checked_at":1323310586,"created_at":1323310586,"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412","executed_at":1323310586,"host":null,"ip":"127.0.0.27","item_name":"f4edede0-f719-012e-b8e4-002590346596","medium_name":["Tweat"],"result":true,"service_id":17972,"service_options":{},"servicetype":"ping","trigger_id":1150,"trigger_options":{"time":"3"},"triggertype":"timeout","user_id":726}
|
6
|
+
]
|
@@ -0,0 +1,5 @@
|
|
1
|
+
[
|
2
|
+
{"_id":"4ee01c022325b409b10018f0","axion_id":425,"axion_name":"Alerting Neo","axion_options":{},"checked_at":1323310082,"created_at":1323310082,"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412","executed_at":1323310082,"host":null,"ip":"127.0.0.27","item_name":"f4edede0-f719-012e-b8e4-002590346596","medium_name":["Tweat"],"result":true,"service_id":17972,"service_options":{},"servicetype":"ping","trigger_id":1150,"trigger_options":{"time":"3"},"triggertype":"timeout","user_id":726},
|
3
|
+
{"_id":"4ee01dca63051f07910008a5","axion_id":425,"axion_name":"Alerting Neo","axion_options":{},"checked_at":1323310538,"created_at":1323310538,"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412","executed_at":1323310538,"host":null,"ip":"127.0.0.27","item_name":"f4edede0-f719-012e-b8e4-002590346596","medium_name":["Tweat"],"result":true,"service_id":17972,"service_options":{},"servicetype":"ping","trigger_id":1150,"trigger_options":{"time":"3"},"triggertype":"timeout","user_id":726},
|
4
|
+
{"_id":"4ee01dfa2325b409b600191f","axion_id":425,"axion_name":"AlertingNeo","axion_options":{},"checked_at":1323310586,"created_at":1323310586,"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412","executed_at":1323310586,"host":null,"ip":"127.0.0.27","item_name":"f4edede0-f719-012e-b8e4-002590346596","medium_name":["Tweat"],"result":true,"service_id":17972,"service_options":{},"servicetype":"ping","trigger_id":1150,"trigger_options":{"time":"3"},"triggertype":"timeout","user_id":726}
|
5
|
+
]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"axion":{"axiontype":"messaging","id":425,"name":"Alerting Neo","options":{},"user_id":726}}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"axion":{"axiontype":"messaging","id":425,"name":"Alerting Neo","options":{},"user_id":726}}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"axion":{"axiontype":"http_request","id":423,"name":"Post message to the Campfire","options":{"uri":"https://convore.com/api/topics/19099/messages/create.json","method":"post","header":{"content-type":"application/x-www-form-urlencoded","Authorization":"Basic ****"},"body":{"message":"Post message by API"}},"user_id":726}},{"axion":{"axiontype":"http_request","id":422,"name":"Post message to the Convore","options":{"uri":"https://convore.com/api/topics/19099/messages/create.json","method":"post","header":{"content-type":"application/x-www-form-urlencoded","Authorization":"Basic ****"},"body":{"message":"Post message by API"}},"user_id":726}},{"axion":{"axiontype":"http_request","id":424,"name":"Post message to the Campfire","options":{"uri":"https://convore.com/api/topics/19099/messages/create.json","method":"post","header":{"content-type":"application/x-www-form-urlencoded","Authorization":"Basic ****"},"body":{"message":"Post message by API"}},"user_id":726}},{"axion":{"axiontype":"messaging","id":425,"name":"Alerting","options":{},"user_id":726}}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"_id":"4ecb5d8e2325b40a41000040","customkey":"9522c887","failed_end_at":1321947285,"failed_start_at":1321942770,"failed_time":4515,"region":"JP","service_id":13731,"servicetype":"ping","tags":[],"user_id":726},{"_id":"4ecb79b02325b442b7000042","customkey":"9522c887","failed_end_at":1321953285,"failed_start_at":1321952385,"failed_time":900,"region":"JP","service_id":13731,"servicetype":"ping","tags":[],"user_id":726}]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"item":{
|
3
|
+
"allowcopy":true,
|
4
|
+
"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412",
|
5
|
+
"host":null,
|
6
|
+
"id":3681,
|
7
|
+
"ip":"127.0.0.27",
|
8
|
+
"name":"f4edede0-f719-012e-b8e4-002590346596",
|
9
|
+
"normalinterval":300,
|
10
|
+
"status":2,
|
11
|
+
"user_id":726,
|
12
|
+
"warninginterval":180,
|
13
|
+
"warningretry":5
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"item":{
|
4
|
+
"allowcopy":true,
|
5
|
+
"customkey":"6f76d596-e4c7-4b54-9afb-e2615c42d1aa",
|
6
|
+
"host":"",
|
7
|
+
"id":3845,
|
8
|
+
"ip":"127.0.0.1",
|
9
|
+
"name":"Monitor SmartMachine",
|
10
|
+
"normalinterval":300,
|
11
|
+
"status":2,
|
12
|
+
"user_id":726,
|
13
|
+
"warninginterval":180,
|
14
|
+
"warningretry":5
|
15
|
+
}
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"item":{
|
19
|
+
"allowcopy":true,
|
20
|
+
"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412",
|
21
|
+
"host":null,
|
22
|
+
"id":3681,
|
23
|
+
"ip":"127.0.0.27",
|
24
|
+
"name":"f4edede0-f719-012e-b8e4-002590346596",
|
25
|
+
"normalinterval":300,
|
26
|
+
"status":2,
|
27
|
+
"user_id":726,
|
28
|
+
"warninginterval":180,
|
29
|
+
"warningretry":5
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"item":{
|
34
|
+
"allowcopy":true,
|
35
|
+
"customkey":null,
|
36
|
+
"host":null,
|
37
|
+
"id":4004,
|
38
|
+
"ip":null,
|
39
|
+
"name":"applog test",
|
40
|
+
"normalinterval":300,
|
41
|
+
"status":1,
|
42
|
+
"user_id":726,
|
43
|
+
"warninginterval":180,
|
44
|
+
"warningretry":5
|
45
|
+
}
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"item":{
|
49
|
+
"allowcopy":true,
|
50
|
+
"customkey":"6f76d596-e4c7-4b54-9afb-e2615c42d1aa",
|
51
|
+
"host":null,
|
52
|
+
"id":3824,
|
53
|
+
"ip":"127.0.0.59",
|
54
|
+
"name":"d969d770-f8d1-012e-b8e8-002590346596",
|
55
|
+
"normalinterval":300,
|
56
|
+
"status":2,
|
57
|
+
"user_id":726,
|
58
|
+
"warninginterval":180,
|
59
|
+
"warningretry":5
|
60
|
+
}
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"item":{
|
64
|
+
"allowcopy":true,
|
65
|
+
"customkey":"411663d2-0fac-406d-a08e-94e79b993a49",
|
66
|
+
"host":null,
|
67
|
+
"id":3823,
|
68
|
+
"ip":"127.0.0.65",
|
69
|
+
"name":"d9ef6020-f8d1-012e-b8e9-002590346596",
|
70
|
+
"normalinterval":300,
|
71
|
+
"status":2,
|
72
|
+
"user_id":726,
|
73
|
+
"warninginterval":180,
|
74
|
+
"warningretry":5
|
75
|
+
}
|
76
|
+
}
|
77
|
+
]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"item":{
|
4
|
+
"allowcopy":true,
|
5
|
+
"customkey":"26cfa4e2-e493-44d7-8322-4f03b467b412",
|
6
|
+
"host":null,
|
7
|
+
"id":3681,
|
8
|
+
"ip":"127.0.0.27",
|
9
|
+
"name":"f4edede0-f719-012e-b8e4-002590346596",
|
10
|
+
"normalinterval":300,
|
11
|
+
"status":2,
|
12
|
+
"user_id":726,
|
13
|
+
"warninginterval":180,
|
14
|
+
"warningretry":5
|
15
|
+
}
|
16
|
+
}
|
17
|
+
]
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"medium":{
|
4
|
+
"id":520,
|
5
|
+
"mediumtype":"email",
|
6
|
+
"name":"Incident ML",
|
7
|
+
"options":{
|
8
|
+
"address":"abc@example.com"
|
9
|
+
},
|
10
|
+
"user_id":726
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"medium":{
|
15
|
+
"id":522,
|
16
|
+
"mediumtype":"twitter",
|
17
|
+
"name":"Tweat",
|
18
|
+
"options":{},
|
19
|
+
"user_id":726
|
20
|
+
}
|
21
|
+
}
|
22
|
+
]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"medium":{"id":522,"mediumtype":"twitter","name":"Tweat","options":{},"user_id":726}}]
|
@@ -0,0 +1 @@
|
|
1
|
+
{"medium":{"id":522,"mediumtype":"twitter","name":"Tweat","options":{},"user_id":726}}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
[
|
2
|
+
{"_id":"4ed8918c2325b4098b01d710","alert":false,"checked_at":1322815134,"compared_at":1322815884,"created_at":1322815884,"job_id":"bce29a30-fef0-012e-4b4f-525400011682","region":"internal","service_id":19838,"servicetype":"load_average","tags":["26cfa4e2-e493-44d7-8322-4f03b467b412"],"threshold":[],"user_id":726,"value":20.0},
|
3
|
+
{"_id":"4edd7a672005893ce1140053","alert":false,"checked_at":1323137583,"compared_at":1323137639,"created_at":1323137639,"job_id":"e21d3e40-01dd-012f-6bef-5254000ab9a8","region":"internal","service_id":19838,"servicetype":"load_average","tags":["26cfa4e2-e493-44d7-8322-4f03b467b412"],"threshold":[],"user_id":726,"value":20.0}
|
4
|
+
]
|
@@ -0,0 +1,3 @@
|
|
1
|
+
[
|
2
|
+
{"_id":"4edd7a672005893ce1140053","alert":false,"checked_at":1323137583,"compared_at":1323137639,"created_at":1323137639,"job_id":"e21d3e40-01dd-012f-6bef-5254000ab9a8","region":"internal","service_id":19838,"servicetype":"load_average","tags":["26cfa4e2-e493-44d7-8322-4f03b467b412"],"threshold":[],"user_id":726,"value":20.0}
|
3
|
+
]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"region":{"code":"JP","id":1}}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"region":{"code":"JP","id":1}}]
|