sensu-plugins-barman-checks 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec819915c39c84e17b07a19c07a12b73a5ecb596
4
- data.tar.gz: 8a4e38db7934ee6256d1d82bf37d3feb6607f62c
3
+ metadata.gz: b113a6636b51139e8ceb88e6f7eb9d64f7899848
4
+ data.tar.gz: 609e4f4ebc8b1871ab70ccb34aa35292f5f7c8bd
5
5
  SHA512:
6
- metadata.gz: 6f40c89144542f201f1c563c473aab631c2ec2237f07c6e2365908f44f44baf0dcae706cab5110c6f15dfc3dd52d18301f713ccb973e9694a4ecd9327c98fc3e
7
- data.tar.gz: 8a2c4305e44f14b226ad0768fae00da6b40d1abd408e03c7929001339d98522fe3b01ee8eed27fdf075d493cd6a7ee082c715ebc2c4d076fa190c67e7cf2afb3
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.casecmp('started')
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.casecmp('failed')
117
+ elsif stupid_barman_cli == 'FAILED'
118
118
  @crit << "Backup ID #{backup} for server #{server} is in failure state: #{stupid_barman_cli}"
119
- next
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
 
@@ -2,7 +2,7 @@ module SensuPluginsBarmanChecks
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 6
5
+ PATCH = 7
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-barman-checks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Brimhall