From 36d307956bcb0c07ad819826831db21913ed8ad5 Mon Sep 17 00:00:00 2001
From: vogelor <vogelor@ispconfig3>
Date: Tue, 25 Nov 2008 14:12:01 -0500
Subject: [PATCH] monitor now monitors RAID changed the menu (hopefully now better to understand) fixed some small errors in update-state
---
interface/web/monitor/show_sys_state.php | 44 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php
index 83e6068..2f19fc4 100644
--- a/interface/web/monitor/show_sys_state.php
+++ b/interface/web/monitor/show_sys_state.php
@@ -168,9 +168,9 @@
/*
* Show some state-info
*/
- $res .= showServerLoad();
- $res .= ' '. showDiskUsage();
- $res .= ' '.showServices();
+ //$res .= showServerLoad();
+ //$res .= ' '. showDiskUsage();
+ //$res .= ' '.showServices();
}
@@ -289,13 +289,49 @@
$messages['warning'][] = 'One or more Components needs a update ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=system_update\");'>[more...]</a>";
break;
+ case 'no_state':
+ /*
+ * not debian and not Ubuntu, so the state could not be monitored...
+ */
+ break;
default:
- $messages['unknown'][] = 'System-Updatese:??? ' .
+ $messages['unknown'][] = 'System-Update:??? ' .
"<a href='#' onclick='loadContent(\"monitor/show_data.php?type=system_update\");'>[more...]</a>";
break;
}
}
+ if ($type == 'raid_state'){
+ switch ($record['state']) {
+ case 'ok':
+ $messages['ok'][] = 'Your RAID is ok ' .
+ "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[more...]</a>";
+ break;
+ case 'info':
+ $messages['info'][] = 'Your RAID is in RESYNC mode ' .
+ "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[more...]</a>";
+ break;
+ case 'critical':
+ $messages['critical'][] = 'Your RAID has one FAULT disk. Replace as soon as possible! '.
+ "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[more...]</a>";
+ break;
+ case 'error':
+ $messages['error'][] = 'Your RAID is not working anymore ' .
+ "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[more...]</a>";
+ break;
+ case 'no_state':
+ /*
+ * mdadm is not installed or the RAID is not supported...
+ */
+ break;
+ default:
+ $messages['unknown'][] = 'RAID state: ??? ' .
+ "<a href='#' onclick='loadContent(\"monitor/show_data.php?type=raid_state\");'>[more...]</a>";
+ break;
+ }
+ }
+
+
if ($type == 'mailq'){
switch ($record['state']) {
case 'ok':
--
Gitblit v1.9.1