From 17db6c110f591226c6dd6a7517295f9bd07c30eb Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 21 Jun 2009 12:14:02 -0400
Subject: [PATCH] FS#770 - DNS A - BACK button returns you to domain list 

---
 server/mods-available/monitor_core_module.inc.php |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/server/mods-available/monitor_core_module.inc.php b/server/mods-available/monitor_core_module.inc.php
index 1b2a9f2..4452fd1 100644
--- a/server/mods-available/monitor_core_module.inc.php
+++ b/server/mods-available/monitor_core_module.inc.php
@@ -219,10 +219,14 @@
                  * calculate the state
                  */
                 $usePercent = floatval($data[$i]['percent']);
-                if ($usePercent > 75) $state = $this->_setState($state, 'info');
-                if ($usePercent > 80) $state = $this->_setState($state, 'warning');
-                if ($usePercent > 90) $state = $this->_setState($state, 'critical');
-                if ($usePercent > 95) $state = $this->_setState($state, 'error');
+				
+				//* We dont want to check the cdrom drive as a cd / dvd is always 100% full
+				if($data[$i]['type'] != 'iso9660' && $data[$i]['type'] != 'cramfs' && $data[$i]['type'] != 'udf') {
+                	if ($usePercent > 75) $state = $this->_setState($state, 'info');
+                	if ($usePercent > 80) $state = $this->_setState($state, 'warning');
+                	if ($usePercent > 90) $state = $this->_setState($state, 'critical');
+                	if ($usePercent > 95) $state = $this->_setState($state, 'error');
+				}
             }
         }
 
@@ -694,10 +698,11 @@
 
     function monitorRkHunter(){
         /*
-         *  This monitoring is expensive, so do it only once a hour
+         *  This monitoring is expensive, so do it only once a day
          */
         $min = date('i');
-        if ($min != 0) return;
+        $hour = date('H');
+        if ($min != 0 && $hour != 23) return;
 
         global $app;
         global $conf;
@@ -1202,7 +1207,7 @@
             case 'log_messages':
                 if($dist == 'debian') $logfile = '/var/log/messages';
 				if($dist == 'redhat') $logfile = '/var/log/messages';
-				if($dist == 'suse') $logfile = '/var/log/messages'
+				if($dist == 'suse') $logfile = '/var/log/messages';
                 break;
             case 'log_ispc_cron':
                 if($dist == 'debian') $logfile = '/var/log/ispconfig/cron.log';

--
Gitblit v1.9.1