Fix incorrect display of watchdog status when using Pgpool-II 3.6.x.
authorpengbo <[email protected]>
Sun, 26 Feb 2017 07:48:03 +0000 (16:48 +0900)
committerpengbo <[email protected]>
Sun, 26 Feb 2017 07:48:03 +0000 (16:48 +0900)
command.php

index 8f8c9be5245a41ea77246b46a7c2c00e0b1f9010..dde45fb5a013e34dc3b04a5fcbfe36590ceb15bb 100644 (file)
@@ -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];