mackerel-rb 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -10
- data/lib/mackerel/client/dashboard.rb +15 -0
- data/lib/mackerel/client/service.rb +10 -0
- data/lib/mackerel/client.rb +4 -0
- data/lib/mackerel/version.rb +1 -1
- data/mackerel-rb.gemspec +1 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb868261232c67d53af7284aca0c269a5e33ce3
|
4
|
+
data.tar.gz: 2e71bd212da025a92ed883582d50b182fc86380f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
40
|
-
|
41
|
-
- [x]
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- [
|
46
|
-
|
47
|
-
|
48
|
-
|
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
|
data/lib/mackerel/client.rb
CHANGED
@@ -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
|
data/lib/mackerel/version.rb
CHANGED
data/mackerel-rb.gemspec
CHANGED
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.
|
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-
|
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.
|