sensu-plugins-graylog 1.3.1 → 1.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f27f446497b1b37e83d18fe1fdf31f7e2a873896d646dbb8835c992c5be7c85
4
- data.tar.gz: 2cf6f28893bf36c6d7309e39ad865b2372311ef011b36db9dd18b46c95b9c475
3
+ metadata.gz: b6d64ef6dea375c536437e3a16db3daf9f0e4d496dc56c601ca6a018af727913
4
+ data.tar.gz: 87aaac3c6148f3802bc1516f8d6cecbb95a12af969eac91a2af5fe5a65c88d6c
5
5
  SHA512:
6
- metadata.gz: 33370f1a0a979d16e60b2e6331adb67bebbb17025d8631bca6015183175ecd8baf9bbb310551c1698f96cb026f94ac7f3b9b255c1c335660bbc5c3883f96bd22
7
- data.tar.gz: bcb4be5ab680fd458b0351942095587780f9a2df1958b185fcfd5c48cb5031510458bf3d50358b9bc2c2deac7e966040b2b042d0a794a73dde60b8cb10e91fdc
6
+ metadata.gz: 96463e7dd81b9bb2082fb21ca99a168629c6795edeb8305b49c4e2d3b29c514b1b07edae5f6a8b21b77bb9b2e91f884f1d152c27fb6fb333d17214521497f283
7
+ data.tar.gz: 9290ae15d2f0be686a89f2edfa22bb5757c1c1124d6b6a938162be46a88ed3a9e623228eba6f1cbcd181ae68ccdadbf6433d1711d92ecc57f7b342b727d189cd
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.4.0] - 2019-03-26
9
+ ### Added
10
+ - check-graylog-buffers.rb: added CSRF protection required by graylog 2.5+. (@themysteriousx)
11
+
8
12
  ## [1.3.1] - 2018-02-20
9
13
  ### Fixed
10
14
  - check-graylog2-alive.rb: changed the default of `--apipath` to `/api` from an empty string. If you specified this there is no change necessary. (@majormoses)
@@ -69,7 +73,8 @@ in your environment is encouraged.
69
73
  ### Added
70
74
  - initial release
71
75
 
72
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-graylog/compare/1.3.1...HEAD
76
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-graylog/compare/1.4.0...HEAD
77
+ [1.4.0]: https://github.com/sensu-plugins/sensu-plugins-graylog/compare/1.3.1...1.4.0
73
78
  [1.3.1]: https://github.com/sensu-plugins/sensu-plugins-graylog/compare/1.3.0...1.3.1
74
79
  [1.3.0]: https://github.com/sensu-plugins/sensu-plugins-graylog/compare/1.2.0...1.3.0
75
80
  [1.2.0]: https://github.com/sensu-plugins/sensu-plugins-graylog/compare/1.1.0...1.2.0
@@ -33,10 +33,13 @@
33
33
  #
34
34
 
35
35
  require 'sensu-plugin/check/cli'
36
+ require 'sensu-plugin/utils'
36
37
  require 'json'
37
38
  require 'rest-client'
38
39
 
39
40
  class CheckGraylogBuffers < Sensu::Plugin::Check::CLI
41
+ include Sensu::Plugin::Utils
42
+
40
43
  option :protocol,
41
44
  description: 'Protocol for connecting to Graylog',
42
45
  long: '--protocol PROTOCOL',
@@ -114,7 +117,14 @@ class CheckGraylogBuffers < Sensu::Plugin::Check::CLI
114
117
  if !postdata
115
118
  JSON.parse(resource.get)
116
119
  else
117
- JSON.parse(resource.post(postdata.to_json, content_type: :json, accept: :json))
120
+ JSON.parse(
121
+ resource.post(
122
+ postdata.to_json,
123
+ content_type: :json,
124
+ accept: :json,
125
+ x_requested_by: "sensu-client on #{settings['client']['name']}"
126
+ )
127
+ )
118
128
  end
119
129
  rescue Errno::ECONNREFUSED => e
120
130
  critical e.message
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsGraylog
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 3
5
- PATCH = 1
4
+ MINOR = 4
5
+ PATCH = 0
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-graylog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.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: 2018-02-21 00:00:00.000000000 Z
11
+ date: 2019-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.3'
75
+ version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.3'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '10.0'
131
+ version: '12.3'
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: '10.0'
138
+ version: '12.3'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: redcarpet
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -182,8 +182,8 @@ description: Sensu graylog plugins
182
182
  email: "<sensu-users@googlegroups.com>"
183
183
  executables:
184
184
  - check-graylog-buffers.rb
185
- - check-graylog-streams.rb
186
185
  - check-graylog2-alive.rb
186
+ - check-graylog-streams.rb
187
187
  - metrics-graylog.rb
188
188
  extensions: []
189
189
  extra_rdoc_files: []
@@ -224,8 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  - !ruby/object:Gem::Version
225
225
  version: '0'
226
226
  requirements: []
227
- rubyforge_project:
228
- rubygems_version: 2.7.6
227
+ rubygems_version: 3.0.3
229
228
  signing_key:
230
229
  specification_version: 4
231
230
  summary: Sensu plugins for graylog