From fe0b5f6880a1da0af34234157e0c1a475eaeb8c8 Mon Sep 17 00:00:00 2001 From: e025532 Date: Tue, 10 Dec 2024 10:17:16 +0100 Subject: [PATCH] Added : Heartbeat Map --- dashboard/EPO-Detail.php | 1 - navbar.html | 9 ++ reports/heartbeat.php | 174 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 reports/heartbeat.php diff --git a/dashboard/EPO-Detail.php b/dashboard/EPO-Detail.php index 9a1c1c9..f45e574 100644 --- a/dashboard/EPO-Detail.php +++ b/dashboard/EPO-Detail.php @@ -62,7 +62,6 @@ echo ""; echo "".$row['Server'].""; echo "".$row['EPO'].""; - } echo ""; } ?> diff --git a/navbar.html b/navbar.html index c2dfd7f..bc6e045 100644 --- a/navbar.html +++ b/navbar.html @@ -68,6 +68,15 @@ +
  • + + Heartbeat + +


  • diff --git a/reports/heartbeat.php b/reports/heartbeat.php new file mode 100644 index 0000000..13a92b2 --- /dev/null +++ b/reports/heartbeat.php @@ -0,0 +1,174 @@ + + + + + + + + + + Infra Reports IT + + + + + + + + + + + + + + + + + + + + + + ";$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']." ")."
    "; + } + } + + ?> + + + +
    +
    + +
    + +
    + +
    + +

    HeartBeat Map for servers NOT in maintenance

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

    +

    Windows :

    +

    +
    +
    +
    ".$wko.'


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

    +

    Linux :

    +

    +
    +
    +
    ".$lko.'


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

    +

    AIX :

    +

    +
    +
    +
    ".$ako.'


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

    +

    Other :

    +

    +
    +
    +
    ".$oko.'


    '.$ook."
    "; ?> +
    +
    + + +
    +
    + +
    +
    +
    + + + + + + +