sensu-plugins-postgres 2.3.2 → 2.4.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: 43c426179d0828ff7ef0de6e2a201735baaca16d742747313360ad7bcd5faa70
4
- data.tar.gz: 88cdc1e4577cf7d50f1a6feb026b376a58734afb4488df9b63408a5830d9ad1c
3
+ metadata.gz: 74f0bb1778fe353859f1a54a779ce25491e0f431d7cffb9dd6d14503acfb00a8
4
+ data.tar.gz: a16364b72ae0deb6cf497368d36a24873d0c6cdd27e1600236dbda9bb64cff77
5
5
  SHA512:
6
- metadata.gz: f0f6523e426f54432345905d36e5a4f4e386066683bb2f9e34f209249adf96412bae11cd311c948e044261d0a16c7451e9a5f05032b386f738223939bae02112
7
- data.tar.gz: d8262bba5ca7c0eaf358be481f279e4e87c518e2c86f8b5c62b922fe03c6ba0cb408bdffcc1600c97e9dea1e36576b9f2fefe930d16f81fb6102b4d250b3f5e8
6
+ metadata.gz: e08e5a0aea3313f6dabe26ff1360b76c92c8998e57f08555a914505f9cacf32bb921c081bc3873a36319c166ebdc7d6b5883841daeb3178c52b7594c6febd962
7
+ data.tar.gz: 62d035afd219f0ff5449151420ff77704958b9777815c3ba28a63be29d2a6b39e73910514e2409a7b29142cf68683817388b77d5d101dfd68fb52c195d37e6bd
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
+ ## [2.4.0] - 2019-10-04
9
+ ### Added
10
+ - Support comments in pgpass file. Keeps previous behavior and adds support for ignoring leading comments (@phumpal)
11
+
8
12
  ## [2.3.2] - 2019-03-12
9
13
  ### Fixed
10
14
  - Support for PostgreSQL v10+ replication function names fixed in `bin/metric-postgres-graphite.rb` (@jfineberg)
@@ -178,7 +182,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
178
182
  ### Added
179
183
  - initial release
180
184
 
181
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-postgres/compare/2.3.2...HEAD
185
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-postgres/compare/2.4.0...HEAD
186
+ [2.4.0]: https://github.com/sensu-plugins/sensu-plugins-postgres/compare/2.3.2...2.4.0
182
187
  [2.3.2]: https://github.com/sensu-plugins/sensu-plugins-postgres/compare/2.3.1...2.3.2
183
188
  [2.3.1]: https://github.com/sensu-plugins/sensu-plugins-postgres/compare/2.3.0...2.3.1
184
189
  [2.3.0]: https://github.com/sensu-plugins/sensu-plugins-postgres/compare/2.2.2...2.3.0
@@ -1,7 +1,14 @@
1
1
  module Pgpass
2
+ def read_pgpass(pg_pass_file)
3
+ File.readlines(pg_pass_file).each do |line|
4
+ return line.strip.split(':') unless line.start_with?('#')
5
+ next
6
+ end
7
+ end
8
+
2
9
  def pgpass
3
10
  if File.file?(config[:pgpass])
4
- pgpass = Hash[%i[hostname port database user password].zip(File.readlines(config[:pgpass])[0].strip.split(':'))]
11
+ pgpass = Hash[%i[hostname port database user password].zip(read_pgpass(config[:pgpass]))]
5
12
  pgpass[:database] = nil if pgpass[:database] == '*'
6
13
  pgpass.each do |k, v|
7
14
  config[k] ||= v
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsPostgres
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 3
5
- PATCH = 2
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-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.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: 2019-03-12 00:00:00.000000000 Z
11
+ date: 2019-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -126,22 +126,22 @@ dependencies:
126
126
  name: mixlib-shellout
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.2'
132
129
  - - "<"
133
130
  - !ruby/object:Gem::Version
134
131
  version: 2.3.0
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: '2.2'
135
135
  type: :development
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: '2.2'
142
139
  - - "<"
143
140
  - !ruby/object:Gem::Version
144
141
  version: 2.3.0
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '2.2'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: pry
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -263,18 +263,18 @@ description: |-
263
263
  more.
264
264
  email: "<sensu-users@googlegroups.com>"
265
265
  executables:
266
- - metric-postgres-graphite.rb
267
- - metric-postgres-locks.rb
266
+ - metric-postgres-dbsize.rb
267
+ - metric-postgres-connections.rb
268
+ - metric-postgres-statsdb.rb
268
269
  - check-postgres-connections.rb
269
- - check-postgres-query.rb
270
270
  - metric-postgres-statstable.rb
271
+ - metric-postgres-graphite.rb
272
+ - metrics-postgres-query.rb
273
+ - check-postgres-query.rb
271
274
  - metric-postgres-statsio.rb
272
- - metric-postgres-connections.rb
273
- - metric-postgres-dbsize.rb
274
275
  - check-postgres-alive.rb
276
+ - metric-postgres-locks.rb
275
277
  - metric-postgres-statsbgwriter.rb
276
- - metrics-postgres-query.rb
277
- - metric-postgres-statsdb.rb
278
278
  - check-postgres-replication.rb
279
279
  extensions: []
280
280
  extra_rdoc_files: []
@@ -324,7 +324,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
324
  - !ruby/object:Gem::Version
325
325
  version: '0'
326
326
  requirements: []
327
- rubygems_version: 3.0.3
327
+ rubyforge_project:
328
+ rubygems_version: 2.7.7
328
329
  signing_key:
329
330
  specification_version: 4
330
331
  summary: Sensu plugins for postgres