tbrehm
2008-12-07 bfbabf3b78aa9d52a0046e2f2f630e8006817a3a
monitor module writes the monitoring data now to the master server instead of the local server.
2 files modified
36 ■■■■ changed files
interface/lib/app.inc.php patch | view | raw | blame | history
server/mods-available/monitor_core_module.inc.php 36 ●●●● patch | view | raw | blame | history
interface/lib/app.inc.php
server/mods-available/monitor_core_module.inc.php
@@ -161,7 +161,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -225,7 +225,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -276,7 +276,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -321,7 +321,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -337,7 +337,7 @@
        $server_id = intval($conf["server_id"]);
        /** get the "active" Services of the server from the DB */
        $services = $app->db->queryOneRecord("SELECT * FROM server WHERE server_id = " . $server_id);
        $services = $app->dbmaster->queryOneRecord("SELECT * FROM server WHERE server_id = " . $server_id);
        /* The type of the Monitor-data */
        $type = 'services';
@@ -445,7 +445,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -525,7 +525,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 0, 2);
@@ -571,7 +571,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -654,7 +654,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -714,7 +714,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 0, 2);
@@ -751,7 +751,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -788,7 +788,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -825,7 +825,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -863,7 +863,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -935,7 +935,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -969,7 +969,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -1003,7 +1003,7 @@
            "'" . $app->db->quote(serialize($data)) . "', " .
            "'" . $state . "'" .
            ")";
        $app->db->query($sql);
        $app->dbmaster->query($sql);
        /* The new data is written, now we can delete the old one */
        $this->_delOldRecords($type, 10);
@@ -1114,7 +1114,7 @@
            "type =" . "'" . $app->db->quote($type) . "' " .
            "AND " .
            "created < " . $old;
        $app->db->query($sql);
        $app->dbmaster->query($sql);
    }
    /*