From 3498f7f39f32e82d4ce4178f708b56e29aadcea0 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 20 Oct 2011 06:23:56 -0400
Subject: [PATCH] - Updated italian language files. - Fixed a warning in apache plugin.

---
 server/mods-available/monitor_core_module.inc.php |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/server/mods-available/monitor_core_module.inc.php b/server/mods-available/monitor_core_module.inc.php
index 4294e54..ec85bed 100644
--- a/server/mods-available/monitor_core_module.inc.php
+++ b/server/mods-available/monitor_core_module.inc.php
@@ -112,6 +112,7 @@
 		$this->_monitorRaid();
 		$this->_monitorRkHunter();
 		$this->_monitorFail2ban();
+		$this->_monitorIPTables();
 		$this->_monitorSysLog();
 	}
 
@@ -509,12 +510,38 @@
 	}
 
 	private function _monitorFail2ban() {
+        global $app;
+
+        /*
+         * First we get the Monitoring-data from the tools
+         */
+        $res = $this->_tools->monitorFail2ban();
+
+        /*
+         * Insert the data into the database
+         */
+        $sql = 'INSERT INTO monitor_data (server_id, type, created, data, state) ' .
+                'VALUES (' .
+                $res['server_id'] . ', ' .
+                "'" . $app->dbmaster->quote($res['type']) . "', " .
+                'UNIX_TIMESTAMP(), ' .
+                "'" . $app->dbmaster->quote(serialize($res['data'])) . "', " .
+                "'" . $res['state'] . "'" .
+                ')';
+        $app->dbmaster->query($sql);
+
+        /* The new data is written, now we can delete the old one */
+        $this->_delOldRecords($res['type'], $res['server_id']);
+    }
+
+
+	private function _monitorIPTables() {
 		global $app;
 
 		/*
 		 * First we get the Monitoring-data from the tools
 		 */
-		$res = $this->_tools->monitorFail2ban();
+		$res = $this->_tools->monitorIPTables();
 
 		/*
 		 * Insert the data into the database

--
Gitblit v1.9.1