sensu-plugins-postgres 2.3.2 → 2.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 +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/sensu-plugins-postgres/pgpass.rb +8 -1
- data/lib/sensu-plugins-postgres/version.rb +2 -2
- metadata +17 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 74f0bb1778fe353859f1a54a779ce25491e0f431d7cffb9dd6d14503acfb00a8
|
|
4
|
+
data.tar.gz: a16364b72ae0deb6cf497368d36a24873d0c6cdd27e1600236dbda9bb64cff77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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(
|
|
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
|
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.
|
|
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-
|
|
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-
|
|
267
|
-
- metric-postgres-
|
|
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
|
-
|
|
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
|