1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-04 16:58:42 +03:00

ctdb-utils: Update Nagios code to use ctdb -X

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2014-11-21 10:48:25 +11:00 committed by Martin Schwenke
parent 0d61b61373
commit b41c1bdaa1

4
ctdb/utils/nagios/check_ctdb Normal file → Executable file
View File

@ -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);