sensu-plugins-io-checks 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/README.md +136 -13
- data/bin/metrics-ioping.rb +5 -4
- data/bin/metrics-iostat-extended.rb +3 -1
- data/lib/sensu-plugins-io-checks.rb +2 -0
- data/lib/sensu-plugins-io-checks/version.rb +3 -1
- metadata +29 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1254fd09ee08c15cdbb412fca6b646f80b8b1d8c63bc627b46616217746909e4
|
4
|
+
data.tar.gz: ef1f7b56c5f02651e804245cf4c80d6039a05f3976e12fedab66758c8e8e3510
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5beb43936dbf3e18192057697aa50f1d1099932ba21b39a23f5d56033d084bbfc3d530921d193918ad1aff953e68291e467aecb3ab6d99900ecaf7e0fa121b6
|
7
|
+
data.tar.gz: 5a4ce47794c4b1265d9a4060f168231d88c4821cd3dad51796914aeae817629df01110f143f81af5773fb9cdea1be5ff91413af611b367b2eafe161078c57c9a
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,24 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [3.0.0] - 2019-12-18
|
9
|
+
### Breaking Changes
|
10
|
+
- Updated required minimum ruby version to 2.3
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- Updated robocup development dependency to '~> 0.78.0'
|
14
|
+
- Updated rake development dependency to '~> 13.0'
|
15
|
+
- Updated bundler development dependancy to '~> 2.1'
|
16
|
+
- Updated codeclimate-test-reporter development dependancy to '~> 1.0'
|
17
|
+
- Updated yard development dependancy to '~> 0.9.20'
|
18
|
+
- Replaced codeclimate with simplecov to generate test coverage reports
|
19
|
+
- Updated bundler development depedency to '~> 2.1'
|
20
|
+
- Updated README to conform with standardization guidelines (sensu-plugins/community#134)
|
21
|
+
|
22
|
+
### Added
|
23
|
+
- Added development dep on simplecov
|
24
|
+
- Updated asset build targets to support centos6
|
25
|
+
|
8
26
|
## [2.0.0] - 2019-05-07
|
9
27
|
### Breaking Changes
|
10
28
|
- Bump `sensu-plugin` dependency from `~> 1.2` to `~> 4.0` you can read the changelog entries for [4.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#400---2018-02-17), [3.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#300---2018-12-04), and [2.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#v200---2017-03-29)
|
@@ -54,7 +72,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
54
72
|
### Added
|
55
73
|
- initial release
|
56
74
|
|
57
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-io-checks/compare/
|
75
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-io-checks/compare/3.0.0...HEAD
|
76
|
+
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-io-checks/compare/2.0.0...3.0.0
|
58
77
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-io-checks/compare/1.0.2...2.0.0
|
59
78
|
[1.0.2]: https://github.com/sensu-plugins/sensu-plugins-io-checks/compare/1.0.1...1.0.2
|
60
79
|
[1.0.1]: https://github.com/sensu-plugins/sensu-plugins-io-checks/compare/1.0.0...1.0.1
|
data/README.md
CHANGED
@@ -1,25 +1,148 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
[![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967&logo=sensu)](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-io-checks)
|
3
2
|
[ ![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-io-checks.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-io-checks)
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-io-checks.svg)](http://badge.fury.io/rb/sensu-plugins-io-checks)
|
5
4
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-io-checks/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-io-checks)
|
6
5
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-io-checks/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-io-checks)
|
7
6
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-io-checks.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-io-checks)
|
8
|
-
[![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967&logo=sensu)](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-io-checks)
|
9
7
|
|
10
|
-
## Sensu
|
11
|
-
|
8
|
+
## Sensu Plugins IO Checks Plugin
|
9
|
+
|
10
|
+
- [Overview](#overview)
|
11
|
+
- [Files](#files)
|
12
|
+
- [Usage examples](#usage-examples)
|
13
|
+
- [Configuration](#configuration)
|
14
|
+
- [Sensu Go](#sensu-go)
|
15
|
+
- [Asset registration](#asset-registration)
|
16
|
+
- [Asset definition](#asset-definition)
|
17
|
+
- [Check definition](#check-definition)
|
18
|
+
- [Sensu Core](#sensu-core)
|
19
|
+
- [Check definition](#check-definition)
|
20
|
+
- [Installation from source](#installation-from-source)
|
21
|
+
- [Additional notes](#additional-notes)
|
22
|
+
- [Contributing](#contributing)
|
23
|
+
|
24
|
+
### Overview
|
25
|
+
|
26
|
+
This plugin provides native system I/O instrumentation for metrics collection via the system `ioping` utility.
|
27
|
+
|
28
|
+
### Files
|
29
|
+
* bin/metrics-ioping.rb
|
30
|
+
* bin/metrics-iostat-extended.rb
|
31
|
+
|
32
|
+
**metrics-ioping**
|
33
|
+
Pushes `ioping` stats into Graphite.
|
34
|
+
|
35
|
+
**metrics-iostat-extended**
|
36
|
+
Collects iostat data for a specified disk or all disks. Output is in Graphite format.
|
37
|
+
|
38
|
+
## Usage examples
|
39
|
+
|
40
|
+
### Help
|
41
|
+
|
42
|
+
**metrics-ioping.rb**
|
43
|
+
```
|
44
|
+
Usage: metrics-ioping.rb (options)
|
45
|
+
-C Use cached I/O
|
46
|
+
-c COUNT Stop after count requests
|
47
|
+
-d DEVICE|FILE|DIRECTORY Destination device, file or directory (required)
|
48
|
+
-D Use direct I/O
|
49
|
+
-i INTERVAL Interval between requests in seconds
|
50
|
+
-n NAME Name of the series (required)
|
51
|
+
-s, --scheme SCHEME Metric naming scheme, text to prepend to metric
|
52
|
+
```
|
53
|
+
|
54
|
+
**metrics-iostat-extended.rb**
|
55
|
+
```
|
56
|
+
Usage: metrics-iostat-extended.rb (options)
|
57
|
+
-d, --disk DISK Disk to gather stats for
|
58
|
+
-x, --exclude-disk DISK[,DISK] List of disks to exclude
|
59
|
+
-i, --interval SECONDS Period over which statistics are calculated (in seconds)
|
60
|
+
-N, --show-dm-names Display the registered device mapper names for any device mapper devices. Useful for viewing LVM2 statistics
|
61
|
+
--scheme SCHEME Metric naming scheme, text to prepend to .$parent.$child
|
62
|
+
```
|
63
|
+
|
64
|
+
## Configuration
|
65
|
+
### Sensu Go
|
66
|
+
#### Asset registration
|
67
|
+
|
68
|
+
Assets are the best way to make use of this plugin. If you're not using an asset, please consider doing so! If you're using sensuctl 5.13 or later, you can use the following command to add the asset:
|
69
|
+
|
70
|
+
`sensuctl asset add sensu-plugins/sensu-plugins-io-checks`
|
71
|
+
|
72
|
+
If you're using an earlier version of sensuctl, you can download the asset definition from [this project's Bonsai asset index page](https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-io-checks).
|
73
|
+
|
74
|
+
#### Asset definition
|
75
|
+
|
76
|
+
```yaml
|
77
|
+
---
|
78
|
+
type: Asset
|
79
|
+
api_version: core/v2
|
80
|
+
metadata:
|
81
|
+
name: sensu-plugins-io-checks
|
82
|
+
spec:
|
83
|
+
url: https://assets.bonsai.sensu.io/60e1713ecd4f0d2e38aada33b15d41580e716048/sensu-plugins-io-checks_2.0.0_centos_linux_amd64.tar.gz
|
84
|
+
sha512: de5f81305652edf93f459831a4a8d492207eb65120f28d249db7697c5dc1925e90d1483c6c46d70f3a48e530e62c1c3170d01c33b9e0d663081dffea52ff7bed
|
85
|
+
```
|
86
|
+
|
87
|
+
#### Check definition
|
88
|
+
|
89
|
+
```yaml
|
90
|
+
---
|
91
|
+
type: CheckConfig
|
92
|
+
api_version: core/v2
|
93
|
+
metadata:
|
94
|
+
name: metrics-ioping
|
95
|
+
namespace: default
|
96
|
+
spec:
|
97
|
+
check_hooks: null
|
98
|
+
command: metrics-ioping.rb -exporter-url http://localhost:8080/metrics
|
99
|
+
output_metric_format: graphite
|
100
|
+
output_metric_handlers:
|
101
|
+
- graphite
|
102
|
+
runtime_assets:
|
103
|
+
- sensu/sensu-plugins-io-checks
|
104
|
+
- sensu/sensu-ruby-runtime
|
105
|
+
stdin: false
|
106
|
+
subdue: null
|
107
|
+
subscriptions:
|
108
|
+
- linux
|
109
|
+
timeout: 5
|
110
|
+
ttl: 0
|
111
|
+
```
|
112
|
+
|
113
|
+
### Sensu Core
|
114
|
+
|
115
|
+
#### Check definition
|
116
|
+
```json
|
117
|
+
{
|
118
|
+
"checks": {
|
119
|
+
"metrics-ioping": {
|
120
|
+
"type": "metric",
|
121
|
+
"command": "metrics-ioping.rb -exporter-url http://localhost:8080/metrics",
|
122
|
+
"subscribers": ["app_tier"],
|
123
|
+
"interval": 10,
|
124
|
+
"handler": "graphite"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
```
|
129
|
+
|
130
|
+
## Installation from source
|
131
|
+
|
132
|
+
### Sensu Go
|
133
|
+
|
134
|
+
See the instructions above for [asset registration](#asset-registration).
|
135
|
+
|
136
|
+
### Sensu Core
|
12
137
|
|
13
|
-
|
138
|
+
Install and setup plugins on [Sensu Core](https://docs.sensu.io/sensu-core/latest/installation/installing-plugins/).
|
14
139
|
|
15
|
-
##
|
16
|
-
* bin/metrics-ioping
|
17
|
-
* bin/metrics-iostat-extended
|
140
|
+
## Additional notes
|
18
141
|
|
19
|
-
|
142
|
+
### Sensu Go Ruby Runtime Assets
|
20
143
|
|
21
|
-
|
144
|
+
The Sensu assets packaged from this repository are built against the Sensu Ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator, or handler), make sure to include the corresponding [Sensu Ruby Runtime Asset](https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime) in the list of assets needed by the resource.
|
22
145
|
|
23
|
-
|
146
|
+
## Contributing
|
24
147
|
|
25
|
-
|
148
|
+
See [CONTRIBUTING.md](https://github.com/sensu-plugins/sensu-plugins-io-checks/blob/master/CONTRIBUTING.md) for information about contributing to this plugin.
|
data/bin/metrics-ioping.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# metrics-ioping
|
5
6
|
#
|
@@ -96,8 +97,8 @@ class IOPingMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
96
97
|
stats
|
97
98
|
end
|
98
99
|
|
99
|
-
NUMBER = /\d+(?:\.\d+)
|
100
|
-
TIME_UNIT = /(?:ns|us|ms|s|min|hour|day)
|
100
|
+
NUMBER = /\d+(?:\.\d+)?/.freeze
|
101
|
+
TIME_UNIT = /(?:ns|us|ms|s|min|hour|day)/.freeze
|
101
102
|
TIME_UNITS = {
|
102
103
|
'ns' => 1e-9,
|
103
104
|
'us' => 1e-6,
|
@@ -108,7 +109,7 @@ class IOPingMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
108
109
|
'day' => 24 * 60 * 60
|
109
110
|
}.freeze
|
110
111
|
# #YELLOW
|
111
|
-
STATS_HEADER = /min\/avg\/max\/mdev
|
112
|
+
STATS_HEADER = /min\/avg\/max\/mdev/.freeze
|
112
113
|
|
113
114
|
def parse_0_6(str)
|
114
115
|
value = /#{NUMBER}/
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# metrics-iostat-extended
|
5
6
|
#
|
@@ -124,6 +125,7 @@ class IOStatExtended < Sensu::Plugin::Metric::CLI::Graphite
|
|
124
125
|
|
125
126
|
stats.each do |disk, metrics|
|
126
127
|
next if exclude_disk.include? disk
|
128
|
+
|
127
129
|
metrics.each do |metric, value|
|
128
130
|
output [config[:scheme], disk, metric].join('.'), value, timestamp
|
129
131
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-io-checks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1
|
33
|
+
version: '2.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1
|
40
|
+
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: codeclimate-test-reporter
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
47
|
+
version: '1.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: github-markup
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '13.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '13.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: redcarpet
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,28 +128,42 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.78.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.78.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.13.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.13.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: yard
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
159
|
+
version: 0.9.20
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
166
|
+
version: 0.9.20
|
153
167
|
description: |-
|
154
168
|
This plugin provides native system I/O
|
155
169
|
instrumentation for metrics collection via the
|
@@ -186,14 +200,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
186
200
|
requirements:
|
187
201
|
- - ">="
|
188
202
|
- !ruby/object:Gem::Version
|
189
|
-
version: 2.
|
203
|
+
version: 2.3.0
|
190
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
206
|
- - ">="
|
193
207
|
- !ruby/object:Gem::Version
|
194
208
|
version: '0'
|
195
209
|
requirements: []
|
196
|
-
|
210
|
+
rubyforge_project:
|
211
|
+
rubygems_version: 2.7.7
|
197
212
|
signing_key:
|
198
213
|
specification_version: 4
|
199
214
|
summary: Sensu plugins for io checks
|