sensu-plugins-barman-checks 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/bin/check-barman-backup-status.rb +5 -7
- data/lib/sensu-plugins-barman-checks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b113a6636b51139e8ceb88e6f7eb9d64f7899848
|
4
|
+
data.tar.gz: 609e4f4ebc8b1871ab70ccb34aa35292f5f7c8bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68d6de685b8a6ee0f81dfd04270e0355b75624029e423e9e4e06c64c9144b8a6b39c123188b9acac26f1e640c0c80dfbe4432d186505bb53e27474e150b30020
|
7
|
+
data.tar.gz: a2df79153ad05f9d6792216b49ed0ba2ad848e6a5d60f2a66ebe546f00d215fdb998ae4f2561aa19a22d4a87af4da3899270be5710776bdc59adc5fb9626bdab
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## 0.0.7 - 2016-11-30
|
9
|
+
### Fixed
|
10
|
+
- Rework logic to fix false reporting of completed backups being in progress
|
11
|
+
|
8
12
|
## 0.0.6 - 2016-11-30
|
9
13
|
### Fixed
|
10
14
|
- Fix another race condition caused by barman cli relating to backup availability
|
@@ -108,25 +108,23 @@ class CheckBarmanBackupStatus < Sensu::Plugin::Check::CLI
|
|
108
108
|
|
109
109
|
backups.each do |backup|
|
110
110
|
stupid_barman_cli = `sudo barman list-backup #{server} | grep #{backup} | awk '{print $4}'`.strip
|
111
|
-
if stupid_barman_cli
|
111
|
+
if stupid_barman_cli == 'STARTED'
|
112
112
|
if backup == @latest
|
113
113
|
@skip_latest = true
|
114
114
|
end
|
115
115
|
puts "Backup ID #{backup} for server #{server} is in progress. Skipping further checking on it"
|
116
116
|
next
|
117
|
-
elsif stupid_barman_cli
|
117
|
+
elsif stupid_barman_cli == 'FAILED'
|
118
118
|
@crit << "Backup ID #{backup} for server #{server} is in failure state: #{stupid_barman_cli}"
|
119
|
-
|
120
|
-
end
|
121
|
-
status = `sudo barman show-backup #{server} #{backup} | grep Status | awk '{print $NF}'`.strip
|
122
|
-
unless status.casecmp('done') || status.casecmp('started')
|
123
|
-
@crit << "Backup for server #{server} with ID #{backup} is in error state: #{status.downcase}"
|
119
|
+
@skip_error = true
|
124
120
|
next
|
125
121
|
end
|
126
122
|
end
|
127
123
|
|
128
124
|
if @skip_latest == true
|
129
125
|
puts 'Latest backup is in progress. Skipping age check.'
|
126
|
+
elsif @skip_error == true
|
127
|
+
puts 'Latest backup is in error state. Skipping age check.'
|
130
128
|
else
|
131
129
|
latest_time = Time.parse(`sudo barman show-backup #{server} #{@latest} | grep 'Begin time' | awk '{print $4,$5}'`.strip)
|
132
130
|
|