summaryrefslogtreecommitdiff
path: root/ctdb/utils
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2013-06-07 19:01:06 +0200
committerAmitay Isaacs <amitay@gmail.com>2013-07-11 15:18:06 +1000
commit27c2c61c21744d6c51bc644f9b261ff39c20695d (patch)
tree17adebb9896d295729235f15262e3e84c57f62ec /ctdb/utils
parentca13f28eefe869f5750e29bc9735c55019771b68 (diff)
downloadsamba-27c2c61c21744d6c51bc644f9b261ff39c20695d.tar.gz
Update Nagios check to work with ctdb versions past 30 Aug 2011
Because of commit a779d83a6213e2ba Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a4afe7af9c9391048d6f80135bbd5e15367770c7)
Diffstat (limited to 'ctdb/utils')
-rw-r--r--ctdb/utils/nagios/check_ctdb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ctdb/utils/nagios/check_ctdb b/ctdb/utils/nagios/check_ctdb
index 943033378c1..cc0c222ffef 100644
--- a/ctdb/utils/nagios/check_ctdb
+++ b/ctdb/utils/nagios/check_ctdb
@@ -178,7 +178,11 @@ if ($info eq "scriptstatus") {
next if $. == 1; # Header
$script_count++;
chop;
- my ($type, $name, $code, $status, $start, $end, @error) = split(":");
+ my ($col0, $type, $name, $code, $status, $start, $end, @error) = split(":");
+ if ($col0 ne '') {
+ # Old version, before 30 Aug 2011 and commit a779d83a6213
+ ($type, $name, $code, $status, $start, $end, @error) = ($col0, $type, $name, $code, $status, $start, $end, @error);
+ }
my $error = join(':', @error);
if ($error ne "") {
$output = "$output ;; " if $output;