From 2b1c01ce2800a7bb74d92ffa86429a63ee889b0d Mon Sep 17 00:00:00 2001 From: pengbo Date: Sun, 26 Feb 2017 16:48:03 +0900 Subject: [PATCH] Fix incorrect display of watchdog status when using Pgpool-II 3.6.x. --- command.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/command.php b/command.php index 8f8c9be..dde45fb 100644 --- a/command.php +++ b/command.php @@ -236,7 +236,14 @@ function getWatchdogInfo($i = '') $arr = explode(' ', $result['SUCCESS']); - if (3.5 <= _PGPOOL2_VERSION) { + if (3.6 <= _PGPOOL2_VERSION) { + $rtn['hostname'] = $arr[1]; + $rtn['pgpool_port'] = $arr[2]; + $rtn['wd_port'] = $arr[3]; + $rtn['status'] = $arr[6]; + $rtn['status_str'] = $arr[7]; + + } elseif (3.5 <= _PGPOOL2_VERSION) { // ex.) Linux_dhcp-177-180_9999 133.137.177.180 9999 9000 4 MASTER $rtn['hostname'] = $arr[1]; $rtn['pgpool_port'] = $arr[2]; -- 2.39.5