Skip to content

Commit 34e774e

Browse files
phumpalmajormoses
authored andcommitted
Adds missing option for custom port
1 parent 3905db2 commit 34e774e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
55

66
## [Unreleased]
77

8+
## [1.1.2] - 2017-06-02
9+
- check-postgresq-replication.rb: Adds missing option for custom port.
10+
811
## [1.1.1] - 2017-04-24
912
### Fixed
1013
- metrics-postgres-query.rb: Restored default value to only return first value in query. (@Micasou)

bin/check-postgres-replication.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# gem: pg
1818
#
1919
# USAGE:
20-
# ./check-postgres-replication.rb -m master_host -s slave_host -d db -u db_user -p db_pass -w warn_threshold -c crit_threshold
20+
# ./check-postgres-replication.rb -m master_host -s slave_host -P port -d db -u db_user -p db_pass -w warn_threshold -c crit_threshold
2121
#
2222
# NOTES:
2323
#
@@ -41,6 +41,12 @@ class CheckPostgresReplicationStatus < Sensu::Plugin::Check::CLI
4141
description: 'PostgreSQL slave HOST',
4242
default: 'localhost')
4343

44+
option(:port,
45+
short: '-P',
46+
long: '--port=PORT',
47+
description: 'PostgreSQL port',
48+
default: 5432)
49+
4450
option(:database,
4551
short: '-d',
4652
long: '--database=NAME',
@@ -111,6 +117,7 @@ def run
111117
dbname: config[:database],
112118
user: config[:user],
113119
password: config[:password],
120+
port: config[:port],
114121
sslmode: ssl_mode,
115122
connect_timeout: config[:timeout])
116123

lib/sensu-plugins-postgres/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module SensuPluginsPostgres
22
module Version
33
MAJOR = 1
44
MINOR = 1
5-
PATCH = 1
5+
PATCH = 2
66

77
VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
88
end

0 commit comments

Comments
 (0)