instrumental_tools 1.1.3 → 1.1.4
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 +4 -4
- data/BUILD.md +19 -1
- data/INSTALL.md +3 -3
- data/README.md +7 -2
- data/chef/instrumental_tools/attributes/default.rb +1 -1
- data/chef/instrumental_tools/recipes/default.rb +1 -1
- data/examples/docker/README.md +1 -1
- data/lib/instrumental_tools/system_inspector/linux.rb +7 -1
- data/lib/instrumental_tools/version.rb +1 -1
- metadata +3 -4
- data/puppet/.librarian/puppet/config +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50f38f48908d371b0eed50d4675bec89713a1233
|
4
|
+
data.tar.gz: 00bbf5415ac6e113941cd84b2c987c6d24b23277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee78fe22322104ac03e3dd747a56c83bd1ff97d1691cefc8d6d1c864db6a895dc00dd36628b0f5e30c5bc4bb07a9c7ffbb8a0393f073af713e4579805e66566c
|
7
|
+
data.tar.gz: d73c0e2c2bf43f0e4cd51982dde63c90f6a612f92f055352fa999cb0bc210f0c08e594c8ec185ccd2baf9653dc72660170164f1ed67e9f8d6b30c4bc137e29ac
|
data/BUILD.md
CHANGED
@@ -18,6 +18,12 @@ to push a new copy of the gem directly to RubyGems. This presumes you have the c
|
|
18
18
|
|
19
19
|
## `deb`, `rpm` and `tgz` packages
|
20
20
|
|
21
|
+
To build everything, use the following command:
|
22
|
+
|
23
|
+
```
|
24
|
+
rake package
|
25
|
+
```
|
26
|
+
|
21
27
|
Building new `deb`, `rpm` and `tgz` packages can be done via the following rake commands:
|
22
28
|
|
23
29
|
For 32 bit Linux:
|
@@ -34,7 +40,6 @@ rake package:linux-x86_64:package
|
|
34
40
|
rake package:linux-x86_64:tarball
|
35
41
|
```
|
36
42
|
|
37
|
-
|
38
43
|
For Mac OS X:
|
39
44
|
|
40
45
|
```
|
@@ -47,6 +52,19 @@ rake package:osx:tarball
|
|
47
52
|
{"url":"https://packagecloud.io","token":"YOUR PACKAGECLOUD API TOKEN"}
|
48
53
|
```
|
49
54
|
|
55
|
+
You will need to install some things:
|
56
|
+
|
57
|
+
```
|
58
|
+
brew install gnu-tar --with-default-names
|
59
|
+
brew install rpm
|
60
|
+
```
|
61
|
+
|
62
|
+
And then use the package_cloud gem to push our packages. For example:
|
63
|
+
|
64
|
+
```
|
65
|
+
package_cloud push expectedbehavior/instrumental/ubuntu/precise instrumental-tools_YOUR_VERSION_HERE_amd64.deb
|
66
|
+
```
|
67
|
+
|
50
68
|
On release, the tarball should be uploaded to the Github releases page and linked to from the main README.md.
|
51
69
|
|
52
70
|
## `exe` packages
|
data/INSTALL.md
CHANGED
@@ -17,7 +17,7 @@ Prebuilt `deb` and `rpm` packages are available via the [packagecloud.io](https:
|
|
17
17
|
|
18
18
|
```sh
|
19
19
|
sudo apt-get install curl
|
20
|
-
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.deb | sudo bash
|
20
|
+
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.deb.sh | sudo bash
|
21
21
|
sudo apt-get install instrumental-tools
|
22
22
|
```
|
23
23
|
|
@@ -25,14 +25,14 @@ sudo apt-get install instrumental-tools
|
|
25
25
|
|
26
26
|
```sh
|
27
27
|
su -c "apt-get install curl"
|
28
|
-
su -c "curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.deb | bash"
|
28
|
+
su -c "curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.deb.sh | bash"
|
29
29
|
su -c "apt-get install instrumental-tools"
|
30
30
|
```
|
31
31
|
|
32
32
|
# Enterprise Linux (CentOS, AWS Linux, RedHat)
|
33
33
|
|
34
34
|
```sh
|
35
|
-
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.rpm | sudo bash
|
35
|
+
curl https://packagecloud.io/install/repositories/expectedbehavior/instrumental/script.rpm.sh | sudo bash
|
36
36
|
sudo yum install instrumental-tools
|
37
37
|
```
|
38
38
|
|
data/README.md
CHANGED
@@ -10,7 +10,12 @@ A collection of tools for monitoring servers with Instrumental ([www.instrumenta
|
|
10
10
|
|
11
11
|
Installation instructions for supported platforms is available in [INSTALL.md](INSTALL.md). The recommended installation method is to use a prebuilt package, which will automatically install the application as a service in your operating system's startup list.
|
12
12
|
|
13
|
-
Once you've installed the package, you will want to edit the `/etc/instrumental.yml` file with your Instrumental API key. Example `/etc/instrumental.yml
|
13
|
+
Once you've installed the package, you will want to edit the `/etc/instrumental.yml` file with your Instrumental API key. Example `/etc/instrumental.yml` (replace `YOUR_API_KEY` with the API key for your Instrumental project):
|
14
|
+
|
15
|
+
```yaml
|
16
|
+
---
|
17
|
+
api_key: YOUR_API_KEY
|
18
|
+
```
|
14
19
|
|
15
20
|
## Sent Metrics
|
16
21
|
|
@@ -96,4 +101,4 @@ Mac OS users: Due to a bug in Ruby, instrument_server can occasionally deadlock
|
|
96
101
|
|
97
102
|
## Troubleshooting & Help
|
98
103
|
|
99
|
-
We are here to help. Email us at [support@instrumentalapp.com](mailto:support@instrumentalapp.com)
|
104
|
+
We are here to help. Email us at [support@instrumentalapp.com](mailto:support@instrumentalapp.com).
|
@@ -1,7 +1,7 @@
|
|
1
1
|
default[:instrumental] = {}
|
2
2
|
default[:instrumental][:api_key] = nil
|
3
3
|
|
4
|
-
default[:instrumental][:version] = "1.1.
|
4
|
+
default[:instrumental][:version] = "1.1.3"
|
5
5
|
default[:instrumental][:repo] = "https://s3.amazonaws.com/instrumental-tools"
|
6
6
|
|
7
7
|
default[:instrumental][:curl_path] = "/usr/bin/curl"
|
@@ -25,8 +25,8 @@ file_name = case node["platform_family"]
|
|
25
25
|
"instrumental-tools_%s_linux-%s.tar.gz" % [version, arch]
|
26
26
|
end
|
27
27
|
|
28
|
-
local_path = ::File.join(node[:instrumental][:local_path], file_name)
|
29
28
|
dest_dir = node[:instrumental][:destination_dir]
|
29
|
+
local_path = ::File.join(node[:instrumental][:local_path] || dest_dir, file_name)
|
30
30
|
conf_file = node[:instrumental][:config_file]
|
31
31
|
remote_name = "%s/%s/%s" % [node[:instrumental][:repo], version, file_name]
|
32
32
|
package_destination = ::File.join(dest_dir, file_name)
|
data/examples/docker/README.md
CHANGED
@@ -17,4 +17,4 @@ The following metric will be output only once for the host:
|
|
17
17
|
|
18
18
|
* `running` - The total number of docker containers running on the host
|
19
19
|
|
20
|
-
This script will only work if the `docker ps` process is
|
20
|
+
This script will only work if the `docker ps` process is executable by the same user that is running `instrument_server`. You should ensure that the user that executes the `instrument_server` process belongs to the `docker` group on your system.
|
@@ -86,6 +86,7 @@ class SystemInspector
|
|
86
86
|
swaptotal = memory_stats["SwapTotal"].to_f
|
87
87
|
swapfree = memory_stats["SwapFree"].to_f
|
88
88
|
swapused = swaptotal - swapfree
|
89
|
+
available = memory_stats["MemAvailable"].to_f if memory_stats["MemAvailable"]
|
89
90
|
|
90
91
|
stats_to_record = {
|
91
92
|
'memory.used_mb' => used / 1024,
|
@@ -96,6 +97,11 @@ class SystemInspector
|
|
96
97
|
|
97
98
|
}
|
98
99
|
|
100
|
+
if available
|
101
|
+
stats_to_record['memory.available_mb'] = available / 1024
|
102
|
+
stats_to_record['memory.available_percent'] = (available / total) * 100
|
103
|
+
end
|
104
|
+
|
99
105
|
if swaptotal > 0
|
100
106
|
stats_to_record.merge!({
|
101
107
|
'swap.used_mb' => swapused / 1024,
|
@@ -143,7 +149,7 @@ class SystemInspector
|
|
143
149
|
def self.disk_io
|
144
150
|
output = {}
|
145
151
|
device_root = "/dev/"
|
146
|
-
mounted_devices = File.read(mount_file).lines.map { |l| l.split.first }.select { |device| device.index(device_root) }.map { |device| File.realpath(device) }
|
152
|
+
mounted_devices = File.read(mount_file).lines.map { |l| l.split.first }.select { |device| device.index(device_root) }.map { |device| File.exists?(device) ? File.realpath(device) : nil }.compact
|
147
153
|
diskstats_lines = File.read(disk_file).lines.map(&:split).select { |values| mounted_devices.include?(File.join(device_root, values[2])) }
|
148
154
|
entries = diskstats_lines.map do |values|
|
149
155
|
entry = {}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instrumental_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Expected Behavior
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: instrumental_agent
|
@@ -247,7 +247,6 @@ files:
|
|
247
247
|
- lib/instrumental_tools/system_inspector/win32.rb
|
248
248
|
- lib/instrumental_tools/version.rb
|
249
249
|
- puppet/.kitchen.yml
|
250
|
-
- puppet/.librarian/puppet/config
|
251
250
|
- puppet/Puppetfile
|
252
251
|
- puppet/Puppetfile.lock
|
253
252
|
- puppet/instrumental_tools/manifests/init.pp
|
@@ -287,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
286
|
version: '0'
|
288
287
|
requirements: []
|
289
288
|
rubyforge_project:
|
290
|
-
rubygems_version: 2.
|
289
|
+
rubygems_version: 2.2.2
|
291
290
|
signing_key:
|
292
291
|
specification_version: 4
|
293
292
|
summary: Command line tools for Instrumental
|