Skip to content

Commit 843dbe2

Browse files
author
vogelor
committed
monitor now uses the timestamp of the masterdb and no longer the timestamp of the individual client-server
1 parent fd5e71e commit 843dbe2

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

server/mods-available/monitor_core_module.inc.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private function _monitorHDQuota() {
129129
'VALUES (' .
130130
$res['server_id'] . ', ' .
131131
"'" . $app->dbmaster->quote($res['type']) . "', " .
132-
time() . ', ' .
132+
'UNIX_TIMESTAMP(), ' .
133133
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
134134
"'" . $res['state'] . "'" .
135135
')';
@@ -154,7 +154,7 @@ private function _monitorServer() {
154154
'VALUES (' .
155155
$res['server_id'] . ', ' .
156156
"'" . $app->dbmaster->quote($res['type']) . "', " .
157-
time() . ', ' .
157+
'UNIX_TIMESTAMP(), ' .
158158
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
159159
"'" . $res['state'] . "'" .
160160
')';
@@ -179,7 +179,7 @@ private function _monitorOsVer() {
179179
'VALUES (' .
180180
$res['server_id'] . ', ' .
181181
"'" . $app->dbmaster->quote($res['type']) . "', " .
182-
time() . ', ' .
182+
'UNIX_TIMESTAMP(), ' .
183183
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
184184
"'" . $res['state'] . "'" .
185185
')';
@@ -204,7 +204,7 @@ private function _monitorIspcVer() {
204204
'VALUES (' .
205205
$res['server_id'] . ', ' .
206206
"'" . $app->dbmaster->quote($res['type']) . "', " .
207-
time() . ', ' .
207+
'UNIX_TIMESTAMP(), ' .
208208
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
209209
"'" . $res['state'] . "'" .
210210
')';
@@ -229,7 +229,7 @@ private function _monitorDiskUsage() {
229229
'VALUES (' .
230230
$res['server_id'] . ', ' .
231231
"'" . $app->dbmaster->quote($res['type']) . "', " .
232-
time() . ', ' .
232+
'UNIX_TIMESTAMP(), ' .
233233
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
234234
"'" . $res['state'] . "'" .
235235
')';
@@ -253,7 +253,7 @@ private function _monitorMemUsage() {
253253
'VALUES (' .
254254
$res['server_id'] . ', ' .
255255
"'" . $app->dbmaster->quote($res['type']) . "', " .
256-
time() . ', ' .
256+
'UNIX_TIMESTAMP(), ' .
257257
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
258258
"'" . $res['state'] . "'" .
259259
')';
@@ -277,7 +277,7 @@ private function _monitorCpu() {
277277
'VALUES (' .
278278
$res['server_id'] . ', ' .
279279
"'" . $app->dbmaster->quote($res['type']) . "', " .
280-
time() . ', ' .
280+
'UNIX_TIMESTAMP(), ' .
281281
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
282282
"'" . $res['state'] . "'" .
283283
')';
@@ -302,7 +302,7 @@ private function _monitorServices() {
302302
'VALUES (' .
303303
$res['server_id'] . ', ' .
304304
"'" . $app->dbmaster->quote($res['type']) . "', " .
305-
time() . ', ' .
305+
'UNIX_TIMESTAMP(), ' .
306306
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
307307
"'" . $res['state'] . "'" .
308308
')';
@@ -327,7 +327,7 @@ private function _monitorOpenVzHost() {
327327
'VALUES (' .
328328
$res['server_id'] . ', ' .
329329
"'" . $app->dbmaster->quote($res['type']) . "', " .
330-
time() . ', ' .
330+
'UNIX_TIMESTAMP(), ' .
331331
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
332332
"'" . $res['state'] . "'" .
333333
')';
@@ -352,7 +352,7 @@ private function _monitorOpenVzUserBeancounter() {
352352
'VALUES (' .
353353
$res['server_id'] . ', ' .
354354
"'" . $app->dbmaster->quote($res['type']) . "', " .
355-
time() . ', ' .
355+
'UNIX_TIMESTAMP(), ' .
356356
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
357357
"'" . $res['state'] . "'" .
358358
')';
@@ -387,7 +387,7 @@ private function _monitorSystemUpdate() {
387387
'VALUES (' .
388388
$res['server_id'] . ', ' .
389389
"'" . $app->dbmaster->quote($res['type']) . "', " .
390-
time() . ', ' .
390+
'UNIX_TIMESTAMP(), ' .
391391
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
392392
"'" . $res['state'] . "'" .
393393
')';
@@ -412,7 +412,7 @@ private function _monitorMailQueue() {
412412
'VALUES (' .
413413
$res['server_id'] . ', ' .
414414
"'" . $app->dbmaster->quote($res['type']) . "', " .
415-
time() . ', ' .
415+
'UNIX_TIMESTAMP(), ' .
416416
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
417417
"'" . $res['state'] . "'" .
418418
')';
@@ -437,7 +437,7 @@ private function _monitorRaid() {
437437
'VALUES (' .
438438
$res['server_id'] . ', ' .
439439
"'" . $app->dbmaster->quote($res['type']) . "', " .
440-
time() . ', ' .
440+
'UNIX_TIMESTAMP(), ' .
441441
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
442442
"'" . $res['state'] . "'" .
443443
')';
@@ -472,7 +472,7 @@ private function _monitorRkHunter() {
472472
'VALUES (' .
473473
$res['server_id'] . ', ' .
474474
"'" . $app->dbmaster->quote($res['type']) . "', " .
475-
time() . ', ' .
475+
'UNIX_TIMESTAMP(), ' .
476476
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
477477
"'" . $res['state'] . "'" .
478478
')';
@@ -497,7 +497,7 @@ private function _monitorFail2ban() {
497497
'VALUES (' .
498498
$res['server_id'] . ', ' .
499499
"'" . $app->dbmaster->quote($res['type']) . "', " .
500-
time() . ', ' .
500+
'UNIX_TIMESTAMP(), ' .
501501
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
502502
"'" . $res['state'] . "'" .
503503
')';
@@ -522,7 +522,7 @@ private function _monitorSysLog() {
522522
'VALUES (' .
523523
$res['server_id'] . ', ' .
524524
"'" . $app->dbmaster->quote($res['type']) . "', " .
525-
time() . ', ' .
525+
'UNIX_TIMESTAMP(), ' .
526526
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
527527
"'" . $res['state'] . "'" .
528528
')';
@@ -547,7 +547,7 @@ private function _monitorMailLog() {
547547
'VALUES (' .
548548
$res['server_id'] . ', ' .
549549
"'" . $app->dbmaster->quote($res['type']) . "', " .
550-
time() . ', ' .
550+
'UNIX_TIMESTAMP(), ' .
551551
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
552552
"'" . $res['state'] . "'" .
553553
')';
@@ -572,7 +572,7 @@ private function _monitorMailWarnLog() {
572572
'VALUES (' .
573573
$res['server_id'] . ', ' .
574574
"'" . $app->dbmaster->quote($res['type']) . "', " .
575-
time() . ', ' .
575+
'UNIX_TIMESTAMP(), ' .
576576
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
577577
"'" . $res['state'] . "'" .
578578
')';
@@ -597,7 +597,7 @@ private function _monitorMailErrLog() {
597597
'VALUES (' .
598598
$res['server_id'] . ', ' .
599599
"'" . $app->dbmaster->quote($res['type']) . "', " .
600-
time() . ', ' .
600+
'UNIX_TIMESTAMP(), ' .
601601
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
602602
"'" . $res['state'] . "'" .
603603
')';
@@ -622,7 +622,7 @@ private function _monitorMessagesLog() {
622622
'VALUES (' .
623623
$res['server_id'] . ', ' .
624624
"'" . $app->dbmaster->quote($res['type']) . "', " .
625-
time() . ', ' .
625+
'UNIX_TIMESTAMP(), ' .
626626
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
627627
"'" . $res['state'] . "'" .
628628
')';
@@ -647,7 +647,7 @@ private function _monitorISPCCronLog() {
647647
'VALUES (' .
648648
$res['server_id'] . ', ' .
649649
"'" . $app->dbmaster->quote($res['type']) . "', " .
650-
time() . ', ' .
650+
'UNIX_TIMESTAMP(), ' .
651651
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
652652
"'" . $res['state'] . "'" .
653653
')';
@@ -672,7 +672,7 @@ private function _monitorFreshClamLog() {
672672
'VALUES (' .
673673
$res['server_id'] . ', ' .
674674
"'" . $app->dbmaster->quote($res['type']) . "', " .
675-
time() . ', ' .
675+
'UNIX_TIMESTAMP(), ' .
676676
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
677677
"'" . $res['state'] . "'" .
678678
')';
@@ -697,7 +697,7 @@ private function _monitorClamAvLog() {
697697
'VALUES (' .
698698
$res['server_id'] . ', ' .
699699
"'" . $app->dbmaster->quote($res['type']) . "', " .
700-
time() . ', ' .
700+
'UNIX_TIMESTAMP(), ' .
701701
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
702702
"'" . $res['state'] . "'" .
703703
')';
@@ -722,7 +722,7 @@ private function _monitorIspConfigLog() {
722722
'VALUES (' .
723723
$res['server_id'] . ', ' .
724724
"'" . $app->dbmaster->quote($res['type']) . "', " .
725-
time() . ', ' .
725+
'UNIX_TIMESTAMP(), ' .
726726
"'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
727727
"'" . $res['state'] . "'" .
728728
')';

0 commit comments

Comments
 (0)