utils: Update Nagios code to use ctdb -X
authorMartin Schwenke <martin@meltin.net>
Thu, 20 Nov 2014 23:48:25 +0000 (10:48 +1100)
committerMartin Schwenke <martin@meltin.net>
Wed, 10 Dec 2014 04:04:54 +0000 (15:04 +1100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit b41c1bdaa1df92ee6c510ae6749d0524b88ef828)

utils/nagios/check_ctdb [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 837a0a4..7803f9a
@@ -177,7 +177,7 @@ sub safe_close_command {
 
 if ($info eq "scriptstatus") {
     $result = OK;
-    safe_open_command('ctdb', '-Y', 'scriptstatus');
+    safe_open_command('ctdb', '-X', 'scriptstatus');
     if ($result == OK) {
         my $script_count = 0;
         my $ok_script_count = 0;
@@ -187,7 +187,7 @@ if ($info eq "scriptstatus") {
             next if $. == 1; # Header
             $script_count++;
             chop;
-            my ($col0, $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);