'' order by hostname asc"); $linux = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'LINUX' order by h.hostname"); $aix = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'AIX' order by h.hostname"); $other = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type is null order by h.hostname"); $lok = "
";$lko = "
";$lcount=0; foreach($linux as $s){ if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){ $lko .= "
".strtoupper($s['HOSTNAME'])." since ".explode(".",$s['PREVTIME'])[0]."
"; $lcount++; }else{ $lok .= "
".strtoupper($s['HOSTNAME']." ")."
"; } } if($lcount){$color = "DarkOrange";$msg = $lcount." issues";}else{$color = "green";$msg = "OK";} $aok = "
";$ako = "
";$acount=0; foreach($aix as $s){ if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){ $ako .= "
".strtoupper($s['HOSTNAME'])." since".explode(".",$s['PREVTIME'])[0]."
"; $acount++; }else{ $aok .= "
".strtoupper($s['HOSTNAME']." ")."
"; } } $ook = "
";$oko = "
";$ocount=0; foreach($other as $s){ if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){ $oko .= "
".strtoupper($s['HOSTNAME'])." since".explode(".",$s['PREVTIME'])[0]."
"; $ocount++; }else{ $ook .= "
".strtoupper($s['HOSTNAME']." ")."
"; } } $wok = "
";$wko = "
";$wcount=0; foreach($windows as $s){ if($s['heartbeat'] < date('Y-m-d H:i:s', strtotime(' -16 minutes '))){ $wko .= "
".strtoupper($s['hostname'])." since ".explode(".",$s['heartbeat'])[0]."
"; $wcount++; }else{ $wok .= "
".strtoupper($s['hostname']." ")."
"; } } ?>

--> ".$wcount." issue(s)";}else{$color = "green";$msg = "OK";} ?>
".$wko.'


'.$wok."
"; ?>

--> ".$lcount." issue(s)";}else{$color = "green";$msg = "OK";} ?>
".$lko.'


'.$lok."
"; ?>

--> ".$acount." issue(s)";}else{$color = "green";$msg = "OK";} ?>
".$ako.'


'.$aok."
"; ?>

--> ".$ocount." issue(s)";}else{$color = "green";$msg = "OK";} ?>
".$oko.'


'.$ook."
"; ?>