sensu-plugins-redis 4.1.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86f53517b67cb3aaa5fcc953809ef66429c79c43ba2aad9bf5074226508c0c01
4
- data.tar.gz: dfd7ea6dff5c4c6169122ef30a15c387880198f635ba89f2c48f8d6bcce73375
3
+ metadata.gz: 9f0a2089a00615fecfea48a3b3b94b8a31c5849247c2daf56c2fdc61263d1c4e
4
+ data.tar.gz: 888599c3ba4bbce8129dc8a4ea3015a83fdf39a04bc522689b3924aebf545d5d
5
5
  SHA512:
6
- metadata.gz: d84e15e8bd2c0853ed43731083c7f9e508b6df19e58130738ec62bc58bc7e7f2f8465dbcfaa5772f9226de286534f578a474eaa4bc8f1dfdfde6bfeaf7c9d99f
7
- data.tar.gz: e9d18fda5c1213871de6257bd82d779ac6dc77581ba5ad0bb31d2e4a47d4ec1c4856c4cedcb1b14777c705d3f675b218587e778a63fa75cb49feba3b42ae04f0
6
+ metadata.gz: 202cf346411eb573e83207951d189104d994a8e612946f76c1ddbe82ac5fe04c6034e6b38305c9471a24e2b9071915585cbbde7b0f90168155dcd6de814a3b4b
7
+ data.tar.gz: 5f119c5ea6530d109c96302dbfba8ee6109cb3f0e639b453fefdf75bbe4c64d440795e1e0955af60847616edca3aed4a37b697aefb3345b77b3cd64f85388b25
@@ -6,6 +6,18 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [5.0.0] - 2020-04-06
10
+ ### Breaking CHANGES
11
+ - Removed centos from bonsai asset definition
12
+
13
+ ### Added
14
+ - 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
15
+ - Updated asset build targets to support centos6
16
+
17
+ ### Changed
18
+ - Updated rubocop dependency to `~> 0.79.0`
19
+ - Remediated issues identified by rubocop upgrade
20
+
9
21
  ## [4.1.0] - 2019-05-06
10
22
  ### Added
11
23
  - `metrics-redis-keys.rb` metric about the number of keys matching a given pattern (@ydkn)
@@ -172,7 +184,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
172
184
  ### Added
173
185
  - initial release
174
186
 
175
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/4.1.0...HEAD
187
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/5.0.0...HEAD
188
+ [5.0.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/4.1.0...5.0.0
176
189
  [4.1.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/4.0.0...4.0.0
177
190
  [4.0.0]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/3.1.1...4.0.0
178
191
  [3.1.1]: https://github.com/sensu-plugins/sensu-plugins-redis/compare/3.1.0...3.1.1
data/README.md CHANGED
@@ -1,14 +1,31 @@
1
- ## Sensu-Plugins-redis
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-redis)
3
2
  [![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-redis.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-redis)
4
3
  [![Gem Version](https://badge.fury.io/rb/sensu-plugins-redis.svg)](http://badge.fury.io/rb/sensu-plugins-redis)
5
4
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-redis/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-redis)
6
5
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-redis/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-redis)
7
6
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-redis.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-redis)
8
7
 
9
- ## Functionality
8
+ ## Sensu Plugins Redis 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
10
25
 
11
- ## Files
26
+ This plugin provides native Redis instrumentation for monitoring and metrics collection, including service health, database connectivity, replication status, `INFO` metrics, key counts, list lengths, and more.
27
+
28
+ ### Files
12
29
  * bin/check-redis-info.rb
13
30
  * bin/check-redis-keys.rb
14
31
  * bin/check-redis-list-length.rb
@@ -20,14 +37,153 @@
20
37
  * bin/metrics-redis-graphite.rb
21
38
  * bin/metrics-redis-keys.rb
22
39
  * bin/metrics-redis-llen.rb
40
+
41
+ **check-redis-info**
42
+ Checks variables from redis [INFO](http://redis.io/commands/INFO).
43
+
44
+ **check-redis-keys**
45
+ Checks the number of keys that match a key's command that are above the provided warn/critical levels.
46
+
47
+ **check-redis-list-length**
48
+ Checks the number of items in a Redis list key.
49
+
50
+ **check-redis-memory**
51
+ Checks Redis [INFO](http://redis.io/commands/INFO) stats and limits values.
52
+
53
+ **check-redis-memory-percentage**
54
+ Checks Redis memory usage in percent.
55
+
56
+ **check-redis-ping**
57
+ Runs Redis ping command to see if Redis is alive.
58
+
59
+ **check-redis-slave-status**
60
+ Checks Redis slave Replication.
61
+
62
+ **check-redis-connections-available**
63
+ Checks the number of connections available on Redis.
64
+
65
+ **metrics-redis-graphite**
66
+ Pushes Redis [INFO](http://redis.io/commands/INFO) stats into graphite.
67
+
68
+ **metrics-redis-keys**
69
+ Gets the number of keys and pushes it to Graphite.
70
+
71
+ **metrics-redis-llen**
72
+ Gets the length of a list and pushes it to Graphite.
73
+
74
+ ## Usage examples
75
+
76
+ ### Help
77
+
78
+ **check-redis-info.rb**
79
+ ```
80
+ Usage: check-redis-info.rb (options)
81
+ --conn-failure-status EXIT_STATUS
82
+ Returns the following exit status for Redis connection failures (included in ['unknown', 'warning', 'critical'])
83
+ -n, --dbnumber DATABASE Redis database number to connect to
84
+ -h, --host HOST Redis Host to connect to
85
+ -P, --password PASSWORD Redis Password to connect with
86
+ -p, --port PORT Redis Port to connect to
87
+ -r, --reconnect ATTEMPTS Reconnect attempts to Redis host
88
+ -K, --redis-info-key KEY Redis info key to monitor
89
+ -V, --redis-info-key-value VALUE Redis info key value to trigger alarm
90
+ -s, --socket SOCKET Redis socket to connect to (overrides Host and Port)
91
+ -t, --timeout TIMEOUT Redis connection timeout
92
+ -T, --transport TRANSPORT Redis transport protocol to use (included in ['redis', 'rediss'])
93
+ ```
94
+
95
+ **metrics-redis-keys.rb**
96
+ ```
97
+ Usage: metrics-redis-keys.rb (options)
98
+ --conn-failure-status EXIT_STATUS
99
+ Returns the following exit status for Redis connection failures (included in ['unknown', 'warning', 'critical'])
100
+ -n, --dbnumber DATABASE Redis database number to connect to
101
+ -h, --host HOST Redis Host to connect to
102
+ -M, --metric-name METRICNAME Name of the metric key. Defaults to "keys"
103
+ -P, --password PASSWORD Redis Password to connect with
104
+ --pattern PATTERN Argument passed into keys command. Defaults to *
105
+ -p, --port PORT Redis Port to connect to
106
+ -r, --reconnect ATTEMPTS Reconnect attempts to Redis host
107
+ -S, --scheme SCHEME Metric naming scheme, text to prepend to metric
108
+ -s, --socket SOCKET Redis socket to connect to (overrides Host and Port)
109
+ -t, --timeout TIMEOUT Redis connection timeout
110
+ -T, --transport TRANSPORT Redis transport protocol to use (included in ['redis', 'rediss'])
111
+ ```
112
+
113
+ ## Configuration
114
+ ### Sensu Go
115
+ #### Asset registration
116
+
117
+ 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:
118
+
119
+ `sensuctl asset add sensu-plugins/sensu-plugins-redis`
120
+
121
+ 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-redis).
122
+
123
+ #### Asset definition
124
+
125
+ ```yaml
126
+ ---
127
+ type: Asset
128
+ api_version: core/v2
129
+ metadata:
130
+ name: sensu-plugins-redis
131
+ spec:
132
+ url: https://assets.bonsai.sensu.io/bfe5bc7de4ab00e71fc3017737cb501ae076bd1f/sensu-plugins-redis_4.2.0_centos_linux_amd64.tar.gz
133
+ sha512: 5df87e7d2c4db85e6a4bdf1f1eb802b2baef933542528e09b3a36d10019ab93e37a7fde7ba3c06334cd22908135ad8704cb5fbef1d1e608f32a2446322222f3b
134
+ ```
135
+
136
+ #### Check definition
137
+
138
+ ```yaml
139
+ ---
140
+ type: CheckConfig
141
+ spec:
142
+ command: "check-redis-info.rb"
143
+ handlers: []
144
+ high_flap_threshold: 0
145
+ interval: 10
146
+ low_flap_threshold: 0
147
+ publish: true
148
+ runtime_assets:
149
+ - sensu-plugins/sensu-plugins-redis
150
+ - sensu/sensu-ruby-runtime
151
+ subscriptions:
152
+ - linux
153
+ ```
154
+
155
+ ### Sensu Core
156
+
157
+ #### Check definition
158
+ ```json
159
+ {
160
+ "checks": {
161
+ "check-redis-info": {
162
+ "command": "check-redis-info.rb",
163
+ "subscribers": ["linux"],
164
+ "interval": 10,
165
+ "refresh": 10,
166
+ "handlers": ["influxdb"]
167
+ }
168
+ }
169
+ }
170
+ ```
171
+
172
+ ## Installation from source
173
+
174
+ ### Sensu Go
175
+
176
+ See the instructions above for [asset registration](#asset-registration).
177
+
178
+ ### Sensu Core
179
+
180
+ Install and setup plugins on [Sensu Core](https://docs.sensu.io/sensu-core/latest/installation/installing-plugins/).
23
181
 
24
- ## Usage
182
+ ## Additional notes
25
183
 
26
- ## Installation
184
+ None
27
185
 
28
- [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
186
+ ## Contributing
29
187
 
30
- ## Notes
188
+ See [CONTRIBUTING.md](https://github.com/sensu-plugins/sensu-plugins-redis/blob/master/CONTRIBUTING.md) for information about contributing to this plugin.
31
189
 
32
- [Developer Guidelines](http://sensu-plugins.io/docs/developer_guidelines.html)
33
- [Testing](http://sensu-plugins.io/docs/testing.html)
@@ -49,7 +49,7 @@ class RedisKeysCheck < Sensu::Plugin::Check::CLI
49
49
  elsif length < config[:warn]
50
50
  warning "'keys #{config[:pattern]}' returned #{length} keys, which is below the warning limit of #{config[:warn]}"
51
51
  else
52
- ok "Redis list #{config[:pattern]} length is above thresholds"
52
+ ok "Redis keys #{config[:pattern]} length is above thresholds"
53
53
  end
54
54
  rescue StandardError
55
55
  send(config[:conn_failure_status], "Could not connect to Redis server on #{redis_endpoint}")
@@ -2,8 +2,8 @@
2
2
 
3
3
  module SensuPluginsRedis
4
4
  module Version
5
- MAJOR = 4
6
- MINOR = 1
5
+ MAJOR = 5
6
+ MINOR = 0
7
7
  PATCH = 0
8
8
 
9
9
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 5.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-05-07 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -28,30 +28,36 @@ dependencies:
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.3'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '5.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '3.3'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: bundler
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '1.7'
53
+ version: '2.1'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '1.7'
60
+ version: '2.1'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: github-markup
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -98,22 +104,22 @@ dependencies:
98
104
  name: mixlib-shellout
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '2.2'
104
107
  - - "<"
105
108
  - !ruby/object:Gem::Version
106
109
  version: 2.3.0
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '2.2'
107
113
  type: :development
108
114
  prerelease: false
109
115
  version_requirements: !ruby/object:Gem::Requirement
110
116
  requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: '2.2'
114
117
  - - "<"
115
118
  - !ruby/object:Gem::Version
116
119
  version: 2.3.0
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '2.2'
117
123
  - !ruby/object:Gem::Dependency
118
124
  name: pry
119
125
  requirement: !ruby/object:Gem::Requirement
@@ -176,14 +182,14 @@ dependencies:
176
182
  requirements:
177
183
  - - "~>"
178
184
  - !ruby/object:Gem::Version
179
- version: 0.51.0
185
+ version: 0.79.0
180
186
  type: :development
181
187
  prerelease: false
182
188
  version_requirements: !ruby/object:Gem::Requirement
183
189
  requirements:
184
190
  - - "~>"
185
191
  - !ruby/object:Gem::Version
186
- version: 0.51.0
192
+ version: 0.79.0
187
193
  - !ruby/object:Gem::Dependency
188
194
  name: serverspec
189
195
  requirement: !ruby/object:Gem::Requirement
@@ -234,17 +240,17 @@ description: |-
234
240
  and more.
235
241
  email: "<sensu-users@googlegroups.com>"
236
242
  executables:
243
+ - metrics-redis-llen.rb
237
244
  - check-redis-ping.rb
245
+ - check-redis-keys.rb
246
+ - check-redis-memory-percentage.rb
247
+ - check-redis-slave-status.rb
238
248
  - check-redis-memory.rb
239
- - metrics-redis-keys.rb
240
249
  - metrics-redis-graphite.rb
241
- - metrics-redis-llen.rb
242
- - check-redis-info.rb
243
250
  - check-redis-list-length.rb
244
251
  - check-redis-connections-available.rb
245
- - check-redis-memory-percentage.rb
246
- - check-redis-slave-status.rb
247
- - check-redis-keys.rb
252
+ - metrics-redis-keys.rb
253
+ - check-redis-info.rb
248
254
  extensions: []
249
255
  extra_rdoc_files: []
250
256
  files:
@@ -290,7 +296,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
296
  - !ruby/object:Gem::Version
291
297
  version: '0'
292
298
  requirements: []
293
- rubygems_version: 3.0.3
299
+ rubyforge_project:
300
+ rubygems_version: 2.7.7
294
301
  signing_key:
295
302
  specification_version: 4
296
303
  summary: Sensu plugins for working with redis