sensu-plugins-disk-checks 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -2
- data/README.md +135 -24
- data/lib/sensu-plugins-disk-checks/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38d37ef9e41773a99e960a7c802bf7c4f95f50983eb641dfa44b971484e312ba
|
4
|
+
data.tar.gz: be708ccaf9d3423c4dfd8c5548922cc5e84e93e300f8c33d11be91593a2830d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 297fef7c160a7fc5be856c932f90a667d7fc445dbb4a6ca23e25af0f0ca3d3dd3267a3f21e334a0ecb0b3ff14ab35d18cd2004d849f4ec216489b976d5c95d13
|
7
|
+
data.tar.gz: bd6238536bf82de618ac8a3de137c7cac5d7150b353b9b109a4cf8a6df6194c4826858665b74a6069e69d486e5556f087688cfb3e1088c9e4af94686438e0f35
|
data/CHANGELOG.md
CHANGED
@@ -5,10 +5,19 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
-
## [5.0.
|
8
|
+
## [5.0.1] - 2019-12-10
|
9
|
+
### Changed
|
10
|
+
- Updated readme for compliance with proposed plugins style guide
|
11
|
+
- Updated sys-filesystem gem dependency from 1.1.7 to 1.3.2
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- Updated asset build targets to support centos6
|
15
|
+
|
16
|
+
## [5.0.0] - 2019-04-10
|
9
17
|
### Breaking Changes
|
10
18
|
- Update minimum required ruby version to 2.3. Drop unsupported ruby versions.
|
11
19
|
- 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)
|
20
|
+
|
12
21
|
### Added
|
13
22
|
- Travis build automation to generate Sensu Asset tarballs that can be used n conjunction with Sensu provided ruby runtime assets and the Bonsai Asset Index
|
14
23
|
- Require latest sensu-plugin for [Sensu Go support](https://github.com/sensu-plugins/sensu-plugin#sensu-go-enablement)
|
@@ -203,7 +212,9 @@ https://mathias-kettner.de/checkmk_filesystems.html
|
|
203
212
|
### Added
|
204
213
|
- initial release
|
205
214
|
|
206
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/
|
215
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/5.0.1...HEAD
|
216
|
+
[5.0.1]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/5.0.0...5.0.1
|
217
|
+
[5.0.0]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/4.0.1...5.0.0
|
207
218
|
[4.0.1]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/4.0.0...4.0.1
|
208
219
|
[4.0.0]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/3.1.1...4.0.0
|
209
220
|
[3.1.1]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/3.1.0...3.1.1
|
data/README.md
CHANGED
@@ -1,16 +1,135 @@
|
|
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-disk-checks)
|
3
2
|
[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-disk-checks.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-disk-checks)
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-disk-checks.svg)](http://badge.fury.io/rb/sensu-plugins-disk-checks)
|
5
4
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-disk-checks/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-disk-checks)
|
6
5
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-disk-checks/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-disk-checks)
|
7
6
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-disk-checks.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-disk-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-disk-checks)
|
9
7
|
|
10
|
-
## Sensu
|
11
|
-
|
8
|
+
## Sensu Disk Checks Plugin
|
9
|
+
- [Overview](#overview)
|
10
|
+
- [Usage examples](#usage-examples)
|
11
|
+
- [Configuration](#configuration)
|
12
|
+
- [Sensu Go](#sensu-go)
|
13
|
+
- [Asset definition](#asset-definition)
|
14
|
+
- [Check definition](#check-definition)
|
15
|
+
- [Sensu Core](#sensu-core)
|
16
|
+
- [Check definition](#check-definition)
|
17
|
+
- [Functionality](#functionality)
|
18
|
+
- [Additional information](#additional-information)
|
19
|
+
- [Installation from source and contributing](#installation-from-source-and-contributing)
|
20
|
+
|
21
|
+
### Overview
|
22
|
+
|
23
|
+
This plugin provides native disk instrumentation for monitoring and metrics collection, including: health, usage, and various metrics.
|
24
|
+
|
25
|
+
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 you include the corresponding Sensu ruby runtime asset in the list of assets needed by the resource. The current ruby-runtime assets can be found [here](https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime) in the [Bonsai Asset Index](bonsai.sensu.io)
|
26
|
+
|
27
|
+
#### Files
|
28
|
+
* bin/check-disk-usage.rb
|
29
|
+
* bin/check-fstab-mounts.rb
|
30
|
+
* bin/check-smart-status.rb
|
31
|
+
* bin/check-smart.rb
|
32
|
+
* bin/check-smart-tests.rb
|
33
|
+
* bin/metrics-disk.rb
|
34
|
+
* bin/metrics-disk-capacity.rb
|
35
|
+
* bin/metrics-disk-usage.rb
|
36
|
+
|
37
|
+
### Usage examples
|
38
|
+
|
39
|
+
#### Help
|
40
|
+
|
41
|
+
**check-disk-usage.rb**
|
42
|
+
```
|
43
|
+
Usage: check-disk-usage.rb (options)
|
44
|
+
-c PERCENT Critical if PERCENT or more of disk full
|
45
|
+
-w PERCENT Warn if PERCENT or more of disk full
|
46
|
+
-t TYPE[,TYPE] Only check fs type(s)
|
47
|
+
-K PERCENT Critical if PERCENT or more of inodes used
|
48
|
+
-i MNT[,MNT] Ignore mount point(s)
|
49
|
+
-o TYPE[.TYPE] Ignore option(s)
|
50
|
+
-p PATHRE Ignore mount point(s) matching regular expression
|
51
|
+
-x TYPE[,TYPE] Ignore fs type(s)
|
52
|
+
-I MNT[,MNT] Include only mount point(s)
|
53
|
+
-W PERCENT Warn if PERCENT or more of inodes used
|
54
|
+
-m MAGIC Magic factor to adjust warn/crit thresholds. Example: .9
|
55
|
+
-l MINIMUM Minimum size to adjust (in GB)
|
56
|
+
-n NORMAL Levels are not adapted for filesystems of exactly this size, where levels are reduced for smaller filesystems and raised for larger filesystems.
|
57
|
+
```
|
58
|
+
|
59
|
+
**metrics-disk-usage.rb**
|
60
|
+
```
|
61
|
+
Usage: metrics-disk-usage.rb (options)
|
62
|
+
-B, --block-size BLOCK_SIZE Set block size for sizes printed
|
63
|
+
-f, --flatten Output mounts with underscore rather than dot
|
64
|
+
-i, --ignore-mount MNT[,MNT] Ignore mounts matching pattern(s)
|
65
|
+
-I, --include-mount MNT[,MNT] Include only mounts matching pattern(s)
|
66
|
+
-l, --local Only check local filesystems (df -l option)
|
67
|
+
--scheme SCHEME Metric naming scheme, text to prepend to .$parent.$child
|
68
|
+
```
|
69
|
+
|
70
|
+
|
71
|
+
### Configuration
|
72
|
+
#### Sensu Go
|
73
|
+
##### Asset registration
|
74
|
+
|
75
|
+
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:
|
12
76
|
|
13
|
-
|
77
|
+
`sensuctl asset add sensu-plugins/sensu-plugins-disk-checks`
|
78
|
+
|
79
|
+
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-disk-checks).
|
80
|
+
|
81
|
+
##### Asset definition
|
82
|
+
|
83
|
+
```yaml
|
84
|
+
---
|
85
|
+
type: Asset
|
86
|
+
api_version: core/v2
|
87
|
+
metadata:
|
88
|
+
name: sensu-plugins-disk-checks
|
89
|
+
spec:
|
90
|
+
url: https://assets.bonsai.sensu.io/73a6f8b6f56672630d83ec21676f9a6251094475/sensu-plugins-disk-checks_5.0.0_centos_linux_amd64.tar.gz
|
91
|
+
sha512: 0ce9d52b270b77f4cab754e55732ae002228201d0bd01a89b954a0655b88c1ee6546e2f82cfd1eec04689af90ad940cde128e8867912d9e415f4a58d7fdcdadf
|
92
|
+
```
|
93
|
+
|
94
|
+
##### Check definition
|
95
|
+
|
96
|
+
```yaml
|
97
|
+
---
|
98
|
+
type: CheckConfig
|
99
|
+
spec:
|
100
|
+
command: "metrics-disk-usage.rb"
|
101
|
+
handlers: []
|
102
|
+
high_flap_threshold: 0
|
103
|
+
interval: 10
|
104
|
+
low_flap_threshold: 0
|
105
|
+
publish: true
|
106
|
+
runtime_assets:
|
107
|
+
- sensu-plugins/sensu-plugins-disk-checks
|
108
|
+
- sensu/sensu-ruby-runtime
|
109
|
+
subscriptions:
|
110
|
+
- linux
|
111
|
+
output_metric_format: graphite_plaintext
|
112
|
+
output_metric_handlers:
|
113
|
+
- influx-db
|
114
|
+
```
|
115
|
+
#### Sensu Core
|
116
|
+
##### Check definition
|
117
|
+
```json
|
118
|
+
{
|
119
|
+
"checks": {
|
120
|
+
"metrics-disk-usage": {
|
121
|
+
"command": "metric-disk-usage.rb",
|
122
|
+
"subscribers": ["linux"],
|
123
|
+
"interval": 10,
|
124
|
+
"refresh": 10,
|
125
|
+
"handlers": ["influxdb"]
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
```
|
131
|
+
|
132
|
+
### Functionality
|
14
133
|
|
15
134
|
**check-disk-usage**
|
16
135
|
|
@@ -74,19 +193,8 @@ Check the health of a disk using `smartctl`
|
|
74
193
|
|
75
194
|
Check the status of SMART offline tests and optionally check if tests were executed in a specified interval
|
76
195
|
|
77
|
-
|
78
|
-
|
79
|
-
* bin/check-fstab-mounts.rb
|
80
|
-
* bin/check-smart-status.rb
|
81
|
-
* bin/check-smart.rb
|
82
|
-
* bin/check-smart-tests.rb
|
83
|
-
* bin/metrics-disk.rb
|
84
|
-
* bin/metrics-disk-capacity.rb
|
85
|
-
* bin/metrics-disk-usage.rb
|
86
|
-
|
87
|
-
## Usage
|
88
|
-
|
89
|
-
This is a sample input file used by check-smart-status and check-smart, see the script for further details.
|
196
|
+
### Additional information
|
197
|
+
The `check-smart.rb` and `check-smart-status.rb` scripts can make use of a json file living on disk in `/etc/sensu/conf.d`with the name `smart.json`. You can see a sample input file used by these scripts below. Please refer to the individual scripts for further details.
|
90
198
|
```json
|
91
199
|
{
|
92
200
|
"smart": {
|
@@ -117,13 +225,16 @@ This is a sample input file used by check-smart-status and check-smart, see the
|
|
117
225
|
}
|
118
226
|
```
|
119
227
|
|
120
|
-
|
228
|
+
### Installation
|
229
|
+
|
230
|
+
### Sensu Go
|
231
|
+
|
232
|
+
See the instructions above for [asset registration](#asset-registration)
|
121
233
|
|
122
|
-
|
234
|
+
### Sensu Core
|
235
|
+
Install and setup plugins on [Sensu Core](https://docs.sensu.io/sensu-core/latest/installation/installing-plugins/)
|
123
236
|
|
124
|
-
## Notes
|
125
237
|
|
126
238
|
### Certification Verification
|
127
239
|
|
128
|
-
If you are verifying certificates in the gem install you will need the certificate for the `sys-filesystem` gem loaded
|
129
|
-
in the gem certificate store. That cert can be found [here](https://raw.githubusercontent.com/djberg96/sys-filesystem/ffi/certs/djberg96_pub.pem).
|
240
|
+
If you are verifying certificates in the gem install you will need the certificate for the `sys-filesystem` gem loaded in the gem certificate store. That cert can be found [here](https://raw.githubusercontent.com/djberg96/sys-filesystem/ffi/certs/djberg96_pub.pem).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-disk-checks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.3.2
|
34
34
|
type: :runtime
|
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: 1.3.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '13.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: redcarpet
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +170,14 @@ description: |-
|
|
170
170
|
health, usage, and various metrics.
|
171
171
|
email: "<sensu-users@googlegroups.com>"
|
172
172
|
executables:
|
173
|
-
- check-fstab-mounts.rb
|
174
|
-
- metrics-disk-usage.rb
|
175
|
-
- check-smart.rb
|
176
173
|
- check-smart-tests.rb
|
174
|
+
- metrics-disk-capacity.rb
|
177
175
|
- check-disk-usage.rb
|
176
|
+
- check-fstab-mounts.rb
|
178
177
|
- check-smart-status.rb
|
179
178
|
- metrics-disk.rb
|
180
|
-
-
|
179
|
+
- check-smart.rb
|
180
|
+
- metrics-disk-usage.rb
|
181
181
|
extensions: []
|
182
182
|
extra_rdoc_files: []
|
183
183
|
files:
|
@@ -219,7 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
219
|
- !ruby/object:Gem::Version
|
220
220
|
version: '0'
|
221
221
|
requirements: []
|
222
|
-
|
222
|
+
rubyforge_project:
|
223
|
+
rubygems_version: 2.7.7
|
223
224
|
signing_key:
|
224
225
|
specification_version: 4
|
225
226
|
summary: Sensu plugins for disk checks
|