mackerel-rb 0.1.2 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32cbe20baab0c32925c4763db61bbd0d857e5880
4
- data.tar.gz: 37d88a75e41e08b94208423dfa1869eced102e11
3
+ metadata.gz: 4bb868261232c67d53af7284aca0c269a5e33ce3
4
+ data.tar.gz: 2e71bd212da025a92ed883582d50b182fc86380f
5
5
  SHA512:
6
- metadata.gz: 02eca6326a8753950750bdde5a29edb8a2cfc827bad5faddef1d77ad0c1559b51dd195a94f24de7240b60a137a4432b809d2835f08db041b66c5f140a4df23ce
7
- data.tar.gz: 823601a2fbcd23cf79e61016153025796816bb75a3d723058d3c8e234906d7fb0e1d9d303be70de01535f873791fcb14dabff6e117f6b416493b98c7dad900bf
6
+ metadata.gz: 88b17ecc9a4215b8bda3be72e262c9050bc5159be1d26b7535a9b08b26c0f2c1db9b82ac6997fdd41ec83d963c59f043277e7dee83e36d8373231a95f7c36847
7
+ data.tar.gz: e45d9ebac3c2e6b01233840c4e6bc5c08f224f7d7c92dcafb9ca320a576069e9ec39817387da245f1b4e6c3ce6b96b2a753a4e3a0614de946c1e5c304201ff1b
data/README.md CHANGED
@@ -36,16 +36,45 @@ end
36
36
 
37
37
  ## Feature
38
38
 
39
- - [x] `GET /api/v0/hosts.json`
40
- - [x] `POST /api/v0/hosts`
41
- - [x] `GET /api/v0/hosts/<hostId>`
42
- - [x] `PUT /api/v0/hosts/<hostId>`
43
- - [x] `POST /api/v0/hosts/<hostId>/status`
44
- - [x] `POST /api/v0/hosts/<hostId>/retire`
45
- - [x] `POST /api/v0/tsdb`
46
- - [x] `GET /api/v0/tsdb/latest`
47
- - [x] `POST /api/v0/services/<serviceName>/tsdb`
48
- - [x] `POST /api/v0/monitoring/checks/report`
39
+ #### Services
40
+
41
+ - [x] List of Services - `GET/api/v0/services`
42
+
43
+ #### Roles
44
+
45
+ - [ ] List of Roles - `GET/api/v0/services/<serviceName>/roles`
46
+
47
+ #### Hosts
48
+
49
+ - [x] Registering host information - `POST/api/v0/hosts`
50
+ - [x] Getting host information - `GET/api/v0/hosts/<hostId>`
51
+ - [x] Updating host information - `PUT/api/v0/hosts/<hostId>`
52
+ - [x] Updating host status - `POST/api/v0/hosts/<hostId>/status`
53
+ - [x] Retiring a host - `POST/api/v0/hosts/<hostId>/retire`
54
+ - [x] List of hosts - `GET/api/v0/hosts.json`
55
+
56
+ #### Metrics
57
+
58
+ - [x] Posting metrics - `POST/api/v0/tsdb`
59
+ - [x] Getting latest metrics - `GET/api/v0/tsdb/latest`
60
+ - [ ] Posting graph definitions - `POST/api/v0/graph-defs/create`
61
+ - [x] Posting service metrics - `POST/api/v0/services/<serviceName>/tsdb`
62
+ - [x] Posting monitoring check results - `POST/api/v0/monitoring/checks/report`
63
+
64
+ #### Monitors
65
+
66
+ - [ ] Register monitor configurations - `POST/api/v0/monitors`
67
+ - [ ] Get monitor configurations - `GET/api/v0/monitors`
68
+ - [ ] Update monitor configurations - `PUT/api/v0/monitors/<monitorId>`
69
+ - [ ] Delete monitor configurations - `DELETE/api/v0/monitors/<monitorId>`
70
+
71
+ #### Dashboards
72
+
73
+ - [ ] Creating Dashboards - `POST/api/v0/dashboards`
74
+ - [x] Getting Dashboards - `GET/api/v0/dashboards/<dashboardId>`
75
+ - [ ] Updating Dashboards - `PUT/api/v0/dashboards/<dashboardId>`
76
+ - [ ] Deleting Dashboards - `DELETE/api/v0/dashboards/<dashboardId>`
77
+ - [x] List of Dashboards - `GET/api/v0/dashboards`
49
78
 
50
79
  ## Contributing
51
80
 
@@ -0,0 +1,15 @@
1
+ module Mackerel
2
+ class Client
3
+ module Dashboard
4
+ def dashboards(options = {})
5
+ response = get 'dashboards', options
6
+ response.body.dashboards
7
+ end
8
+
9
+ def dashboard(id)
10
+ response = get 'dashboards', id
11
+ response.body
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,10 @@
1
+ module Mackerel
2
+ class Client
3
+ module Service
4
+ def services(options = {})
5
+ response = get 'services', options
6
+ response.body.services
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,8 +1,10 @@
1
1
  require 'mackerel/configuration'
2
2
  require 'mackerel/connection'
3
+ require 'mackerel/client/dashboard'
3
4
  require 'mackerel/client/host'
4
5
  require 'mackerel/client/host_status'
5
6
  require 'mackerel/client/tsdb'
7
+ require 'mackerel/client/service'
6
8
  require 'mackerel/client/service_tsdb'
7
9
  require 'mackerel/client/monitoring_check_report'
8
10
  require 'mackerel/response/raise_error'
@@ -12,9 +14,11 @@ module Mackerel
12
14
  include Configuration
13
15
  include Connection
14
16
 
17
+ include Client::Dashboard
15
18
  include Client::Host
16
19
  include Client::HostStatus
17
20
  include Client::Tsdb
21
+ include Client::Service
18
22
  include Client::ServiceTsdb
19
23
  include Client::MonitoringCheckReport
20
24
  end
@@ -1,3 +1,3 @@
1
1
  module Mackerel
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/mackerel-rb.gemspec CHANGED
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency "faraday_middleware"
25
25
  spec.add_development_dependency "bundler", "~> 1.9"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "pry"
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mackerel-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mizokami
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2015-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '10.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description: Yet another mackerel client for Ruby.
98
112
  email:
99
113
  - suzunatsu@yahoo.com
@@ -114,9 +128,11 @@ files:
114
128
  - lib/mackerel.rb
115
129
  - lib/mackerel/cli.rb
116
130
  - lib/mackerel/client.rb
131
+ - lib/mackerel/client/dashboard.rb
117
132
  - lib/mackerel/client/host.rb
118
133
  - lib/mackerel/client/host_status.rb
119
134
  - lib/mackerel/client/monitoring_check_report.rb
135
+ - lib/mackerel/client/service.rb
120
136
  - lib/mackerel/client/service_tsdb.rb
121
137
  - lib/mackerel/client/tsdb.rb
122
138
  - lib/mackerel/commands/host.rb
@@ -147,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
163
  version: '0'
148
164
  requirements: []
149
165
  rubyforge_project:
150
- rubygems_version: 2.4.5
166
+ rubygems_version: 2.4.5.1
151
167
  signing_key:
152
168
  specification_version: 4
153
169
  summary: Yet another mackerel client for Ruby.