instrumental_tools 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/README.md +4 -0
- data/bin/instrument_server +42 -7
- data/lib/instrumental_tools/version.rb +1 -1
- metadata +74 -89
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -75,3 +75,7 @@ Collect commit counts from git repositories:
|
|
75
75
|
cd project_directory
|
76
76
|
gitstrumental <API_KEY>
|
77
77
|
```
|
78
|
+
|
79
|
+
## Troubleshooting & Help
|
80
|
+
|
81
|
+
We are here to help. Email us at [support@instrumentalapp.com](mailto:support@instrumentalapp.com), or visit the [Instrumental Support](https://fastestforward.campfirenow.com/6b934) Campfire room.
|
data/bin/instrument_server
CHANGED
@@ -35,6 +35,14 @@ class SystemInspector
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
def self.command_missing(command, section)
|
39
|
+
puts "Command #{command} not found. Metrics for #{section} will not be collected."
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.command_present?(command, section)
|
43
|
+
`which #{command}`.length > 0 || command_missing(command, section)
|
44
|
+
end
|
45
|
+
|
38
46
|
def load_all
|
39
47
|
self.class.memory.cycle
|
40
48
|
|
@@ -50,7 +58,11 @@ class SystemInspector
|
|
50
58
|
|
51
59
|
module OSX
|
52
60
|
def self.load_cpu
|
53
|
-
{ :gauges =>
|
61
|
+
output = { :gauges => {} }
|
62
|
+
if SystemInspector.command_present?('top', 'CPU')
|
63
|
+
output[:gauges].merge!(top)
|
64
|
+
end
|
65
|
+
output
|
54
66
|
end
|
55
67
|
|
56
68
|
def self.top
|
@@ -84,7 +96,11 @@ class SystemInspector
|
|
84
96
|
|
85
97
|
def self.load_memory
|
86
98
|
# TODO: swap
|
87
|
-
{ :gauges =>
|
99
|
+
output = { :gauges => {} }
|
100
|
+
if SystemInspector.command_present?('vm_stat', 'memory')
|
101
|
+
output[:gauges].merge!(vm_stat)
|
102
|
+
end
|
103
|
+
output
|
88
104
|
end
|
89
105
|
|
90
106
|
def self.vm_stat
|
@@ -108,7 +124,11 @@ class SystemInspector
|
|
108
124
|
end
|
109
125
|
|
110
126
|
def self.load_disks
|
111
|
-
{ :gauges =>
|
127
|
+
output = { :gauges => {} }
|
128
|
+
if SystemInspector.command_present?('df', 'disk')
|
129
|
+
output[:gauges].merge!(df)
|
130
|
+
end
|
131
|
+
output
|
112
132
|
end
|
113
133
|
|
114
134
|
def self.df
|
@@ -183,8 +203,12 @@ class SystemInspector
|
|
183
203
|
|
184
204
|
def self.load_memory
|
185
205
|
output = { :gauges => {} }
|
186
|
-
|
187
|
-
|
206
|
+
if SystemInspector.command_present?('free', 'memory')
|
207
|
+
output[:gauges].merge!(memory)
|
208
|
+
end
|
209
|
+
if SystemInspector.command_present?('free', 'swap')
|
210
|
+
output[:gauges].merge!(swap)
|
211
|
+
end
|
188
212
|
output
|
189
213
|
end
|
190
214
|
|
@@ -209,7 +233,14 @@ class SystemInspector
|
|
209
233
|
end
|
210
234
|
|
211
235
|
def self.load_disks
|
212
|
-
{ :gauges =>
|
236
|
+
output = { :gauges => {} }
|
237
|
+
if SystemInspector.command_present?('df', 'disk storage')
|
238
|
+
output[:gauges].merge!(disk_storage)
|
239
|
+
end
|
240
|
+
if SystemInspector.command_present?('mount', 'disk IO')
|
241
|
+
output[:gauges].merge!(disk_io)
|
242
|
+
end
|
243
|
+
output
|
213
244
|
end
|
214
245
|
|
215
246
|
def self.disk_storage
|
@@ -252,7 +283,11 @@ class SystemInspector
|
|
252
283
|
end
|
253
284
|
|
254
285
|
def self.load_filesystem
|
255
|
-
{ :gauges =>
|
286
|
+
output = { :gauges => {} }
|
287
|
+
if SystemInspector.command_present?('sysctl', 'filesystem')
|
288
|
+
output[:gauges].merge!(filesystem)
|
289
|
+
end
|
290
|
+
output
|
256
291
|
end
|
257
292
|
|
258
293
|
def self.filesystem
|
metadata
CHANGED
@@ -1,15 +1,10 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: instrumental_tools
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
- 1
|
10
|
-
version: 0.5.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.2
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Elijah Miller
|
14
9
|
- Christopher Zelenak
|
15
10
|
- Kristopher Chambers
|
@@ -17,81 +12,82 @@ authors:
|
|
17
12
|
autorequire:
|
18
13
|
bindir: bin
|
19
14
|
cert_chain: []
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
dependencies:
|
24
|
-
- !ruby/object:Gem::Dependency
|
15
|
+
date: 2012-04-19 00:00:00.000000000 Z
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
25
18
|
name: json
|
26
|
-
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
27
20
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
|
32
|
-
segments:
|
33
|
-
- 0
|
34
|
-
version: "0"
|
35
|
-
prerelease: false
|
36
|
-
requirement: *id001
|
21
|
+
requirements:
|
22
|
+
- - ! '>='
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '0'
|
37
25
|
type: :runtime
|
38
|
-
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
39
34
|
name: instrumental_agent
|
40
|
-
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
41
36
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 57
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
- 8
|
49
|
-
- 3
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
50
40
|
version: 0.8.3
|
51
|
-
prerelease: false
|
52
|
-
requirement: *id002
|
53
41
|
type: :runtime
|
54
|
-
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.8.3
|
49
|
+
- !ruby/object:Gem::Dependency
|
55
50
|
name: pidly
|
56
|
-
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
57
52
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
hash: 29
|
62
|
-
segments:
|
63
|
-
- 0
|
64
|
-
- 1
|
65
|
-
- 3
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
66
56
|
version: 0.1.3
|
67
|
-
prerelease: false
|
68
|
-
requirement: *id003
|
69
57
|
type: :runtime
|
70
|
-
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ! '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 0.1.3
|
65
|
+
- !ruby/object:Gem::Dependency
|
71
66
|
name: rake
|
72
|
-
|
67
|
+
requirement: !ruby/object:Gem::Requirement
|
73
68
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
segments:
|
79
|
-
- 0
|
80
|
-
version: "0"
|
81
|
-
prerelease: false
|
82
|
-
requirement: *id004
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
83
73
|
type: :development
|
84
|
-
|
85
|
-
|
74
|
+
prerelease: false
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
description: A collection of scripts useful for monitoring servers and services with
|
82
|
+
Instrumental (instrumentalapp.com)
|
83
|
+
email:
|
86
84
|
- support@instrumentalapp.com
|
87
|
-
executables:
|
85
|
+
executables:
|
88
86
|
- gitstrumental
|
89
87
|
- instrument_server
|
90
88
|
extensions: []
|
91
|
-
|
92
89
|
extra_rdoc_files: []
|
93
|
-
|
94
|
-
files:
|
90
|
+
files:
|
95
91
|
- .gitignore
|
96
92
|
- CHANGELOG.md
|
97
93
|
- Gemfile
|
@@ -102,39 +98,28 @@ files:
|
|
102
98
|
- instrumental_tools.gemspec
|
103
99
|
- lib/instrumental_tools/capistrano.rb
|
104
100
|
- lib/instrumental_tools/version.rb
|
105
|
-
has_rdoc: true
|
106
101
|
homepage: http://github.com/fastestforward/instrumental_tools
|
107
102
|
licenses: []
|
108
|
-
|
109
103
|
post_install_message:
|
110
104
|
rdoc_options: []
|
111
|
-
|
112
|
-
require_paths:
|
105
|
+
require_paths:
|
113
106
|
- lib
|
114
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
108
|
none: false
|
116
|
-
requirements:
|
117
|
-
- -
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
|
120
|
-
|
121
|
-
- 0
|
122
|
-
version: "0"
|
123
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ! '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
114
|
none: false
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
|
129
|
-
segments:
|
130
|
-
- 0
|
131
|
-
version: "0"
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
132
119
|
requirements: []
|
133
|
-
|
134
120
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.
|
121
|
+
rubygems_version: 1.8.19
|
136
122
|
signing_key:
|
137
123
|
specification_version: 3
|
138
124
|
summary: Command line tools for Instrumental
|
139
125
|
test_files: []
|
140
|
-
|