IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32404


Ignore:
Timestamp:
Sep 14, 2011, 10:20:29 AM (15 years ago)
Author:
Serge CHASTEL
Message:

Now displays seconds behind master for replication slaves

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/czartool_labels.php

    r32373 r32404  
    200200      echo "<tr>";
    201201      createTableColumnHeader("Database");
    202       createTableColumnHeader("Status");
     202      createTableColumnHeader("Status (sec behind master)");
    203203      showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1);
    204204      showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS);
     
    903903        //die("MySQL DB connection error: Check the configuration for $replDatabaseName");
    904904        //die("");
    905         return;
     905        return -1;
    906906
    907907    }
     
    910910        # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
    911911        $errorStatusInMySql = $row[18];
    912         $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>");
     912        $sec_behind = $row[32];
     913        $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font color=\"red\">PROBLEM</font>");
    913914        echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
    914915        if ($errorStatusInMySql!=0) {
Note: See TracChangeset for help on using the changeset viewer.