sensu-plugins-varnish 1.1.0 → 1.1.1

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
  SHA1:
3
- metadata.gz: e5e0f886fc302904f4fbec469d3d29bb3ede8093
4
- data.tar.gz: 2a9a72e264fb432cc0ff878257a784ca2ab015f4
3
+ metadata.gz: 4bb123e60a211227bf52003d63bd5c35722e1438
4
+ data.tar.gz: 210c42bf554975d06d9d3b67b7715e905d0dd33e
5
5
  SHA512:
6
- metadata.gz: 33b7405d02ff2acd1065f87e449d6bda8a85e3794914b65604e8fc4224cd24230ebef4592dd99c905ff615f01594b5b266183dd633382ee17b3687375682186b
7
- data.tar.gz: 62fc22513eb76c53caeff5b61d5e88f1066411ad71ff8c6b34f65ae088f2ef3226244403584661b8379635703f53e6c99a5f5ab0be61af1ecdc3b47cafd7efe0
6
+ metadata.gz: cb7369976fff7287ceef9924f0f551eec9f4ac398388a55138d9772e30fa9bf1254b0b21e186faab671388bf5f51ae966cbe145fda5763d6ce7736fd382ad16f
7
+ data.tar.gz: eee1e5fe3632d8d4f8e2897060931ff58c29e18e0a544ebc3cb6110ed6cee542f7a6f5fe169b9db0e6509e9bec37c5a94dd9f66c1303c3d9e78554a6fbf31ec7
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.1.1] - 2017-08-18
9
+ ### Fixed
10
+ - `which` returns a newline terminated string in all cases - strip it before trying to run the command otherwise the generated command will be split over two lines and fail (@warmfusion)
11
+
12
+ ### Changed
13
+ - switched from `strip` to `chomp` as it will be more performant for the use case (@majormoses)
14
+
8
15
  ## [1.1.0] - 2017-08-01
9
16
  ### Changed
10
17
  - Use full path for varnish scripts to allow sudoers files with explicit binaries to work (@warmfusion)
@@ -49,6 +56,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
49
56
  - initial release
50
57
 
51
58
  [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-varnish/compare/1.1.0...HEAD
59
+ [1.1.1]: https://github.com/sensu-plugins/sensu-plugins-varnish/compare/1.1.0...1.1.1
52
60
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-varnish/compare/1.0.0...1.1.0
53
61
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-varnish/compare/0.1.0...1.0.0
54
62
  [0.1.0]: https://github.com/sensu-plugins/sensu-plugins-varnish/compare/0.0.5...0.1.0
data/README.md CHANGED
@@ -20,7 +20,7 @@ manage your sudo lists;
20
20
 
21
21
  ```
22
22
  # Assuming that your varnish scripts are located in /usr/bin;
23
- sensu ALL=(ALL) NOPASSWD: /usr/bin/varnishadm /usr/bin/varnishstat
23
+ sensu ALL=(ALL) NOPASSWD: /usr/bin/varnishadm, /usr/bin/varnishstat
24
24
  ```
25
25
 
26
26
 
@@ -77,7 +77,7 @@ class CheckVarnishStatus < Sensu::Plugin::Check::CLI
77
77
  # Main Function
78
78
  def run
79
79
  # Keep a full reference for the varnish binary so sudo uses a full path
80
- varnishadm = `which varnishadm 2>/dev/null`.to_s
80
+ varnishadm = `which varnishadm 2>/dev/null`.chomp
81
81
  unknown 'varnishadm is not installed!' unless varnishadm.include? 'varnish'
82
82
  command = `sudo #{varnishadm} -T #{config[:host]}:#{config[:port]} -S #{config[:secret]} -t #{config[:timeout]} #{config[:command]}`
83
83
  if config[:command] == 'status'
@@ -62,7 +62,7 @@ class VarnishMetrics < Sensu::Plugin::Metric::CLI::Graphite
62
62
 
63
63
  def run
64
64
  # Keep a full reference for the varnish binary so sudo uses a full path
65
- varnishstat_command = `which varnishstat 2>/dev/null`.to_s
65
+ varnishstat_command = `which varnishstat 2>/dev/null`.chomp
66
66
  unknown 'varnishstat is not installed!' unless varnishstat_command.include? 'varnish'
67
67
 
68
68
  begin
@@ -2,7 +2,7 @@ module SensuPluginsVarnish
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-varnish
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.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: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: crack