sensu-plugins-postgres 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +7 -0
- data/bin/metric-postgres-connections.rb +6 -3
- data/lib/sensu-plugins-postgres/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTIyN2VhZjQwMWZhNzhlOGZjZDUyYjI4MWFiYmIzZGRhNGFmYzNiZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDQ4ZGVhOGZlZDQ4MTFkZjdmMjU2NzgxNDM5YWUwNWMyYjNmNDEyNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzczNThmZmYwOGQwZDlkYzNmMjdhMjI2YzExNmNjYzdlMjNiZjhjMjc0MWYy
|
10
|
+
MTc0NjQxNjk1MWQyZGY5Mzg5YzdiOGZmNTViMjJhMmQ3MGM3ZTgzOWY1NWFj
|
11
|
+
YWFhZjQwNDFhYmRmYzY3NmMzYTY4ZTk3YTVkMWQ5ZWYyNDVmMjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzY3Y2MwNzk1YWFkMjE2NWM3ZGM4N2Q5NDExMmNmMzk1ZGZlMTQ5OGUyOTg4
|
14
|
+
N2RkODA1ZGNlMzg5MGI1MTZjZGY3MTgyNDk2MWFlMjFlMTJmNzc1ODhhOTRm
|
15
|
+
NTc1ZTEwNjE5M2I4N2YxNjg2MzdlOTUxN2NkNjk1ZmNhZjczZjE=
|
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
|
+
## [0.1.1] - 2016-03-24
|
9
|
+
### Added
|
10
|
+
- metric-postgres-connections: Add new metric `total`
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
- metric-postgres-connections: Correctly evaluate and collect metrics for active connections and active connections waiting on backend locks
|
14
|
+
|
8
15
|
## [0.1.0] - 2016-03-09
|
9
16
|
### Added
|
10
17
|
- Add new plugin `check-postgres-connections` that checks the number of connections to a DB
|
@@ -77,18 +77,21 @@ class PostgresStatsDBMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
77
77
|
|
78
78
|
metrics = {
|
79
79
|
active: 0,
|
80
|
-
waiting: 0
|
80
|
+
waiting: 0,
|
81
|
+
total: 0
|
81
82
|
}
|
82
83
|
con.exec(request.join(' ')) do |result|
|
83
84
|
result.each do |row|
|
84
|
-
if row['waiting']
|
85
|
+
if row['waiting'] == 't'
|
85
86
|
metrics[:waiting] = row['count']
|
86
|
-
|
87
|
+
elsif row['waiting'] == 'f'
|
87
88
|
metrics[:active] = row['count']
|
88
89
|
end
|
89
90
|
end
|
90
91
|
end
|
91
92
|
|
93
|
+
metrics[:total] = (metrics[:waiting].to_i + metrics[:active].to_i)
|
94
|
+
|
92
95
|
metrics.each do |metric, value|
|
93
96
|
output "#{config[:scheme]}.connections.#{config[:db]}.#{metric}", value, timestamp
|
94
97
|
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: 0.1.
|
4
|
+
version: 0.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: 2016-03-
|
11
|
+
date: 2016-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|