From 8793b32c8e8745e04571a30735b210f68b23ef92 Mon Sep 17 00:00:00 2001 From: vogelor <vogelor@ispconfig3> Date: Mon, 24 Nov 2008 12:51:48 -0500 Subject: [PATCH] Monitor Module now only shows the state of the "active" services Monitor Module now has system state --- interface/web/monitor/lib/module.conf.php | 154 ++++++++++++++++++++++++++++---------------------- 1 files changed, 86 insertions(+), 68 deletions(-) diff --git a/interface/web/monitor/lib/module.conf.php b/interface/web/monitor/lib/module.conf.php index d9a78a7..2a443e3 100644 --- a/interface/web/monitor/lib/module.conf.php +++ b/interface/web/monitor/lib/module.conf.php @@ -7,7 +7,17 @@ $module["title"] = "Monitor"; $module["template"] = "module.tpl.htm"; $module["tab_width"] = ''; -$module["startpage"] = "monitor/show_data.php?type=overview"; +$module["startpage"] = "monitor/show_sys_state.php?state=system"; + +unset($items); +$items[] = array( 'title' => "Show System State", + 'target' => 'content', + 'link' => 'monitor/show_sys_state.php?state=system'); + +$module["nav"][] = array( 'title' => 'System State', + 'open' => 1, + 'items' => $items); + /* We need all the available servers on the left navigation. @@ -15,24 +25,25 @@ */ $servers = $app->db->queryAllRecords("SELECT server_id, server_name FROM server order by server_name"); -$dropDown = "<select id='server_id' onchange=\"loadContent('monitor/show_data.php?type=overview&server=' + document.getElementById('server_id').value);\">"; +$dropDown = "<select id='server_id' onchange=\"loadContent('monitor/show_sys_state.php?state=server&server=' + document.getElementById('server_id').value);\">"; foreach ($servers as $server) { - $dropDown .= "<option value='" . $server['server_id'] . "|" . $server['server_name'] . "'>" . $server['server_name'] . "</option>"; + $dropDown .= "<option value='" . $server['server_id'] . "|" . $server['server_name'] . "'>" . $server['server_name'] . "</option>"; } $dropDown .= "</select>"; /* Now add them as dropdown to the navigation */ +unset($items); $items[] = array( 'title' => $dropDown, - 'target' => '', // no action! - 'link' => ''); // no action! + 'target' => '', // no action! + 'link' => ''); // no action! $module["nav"][] = array( 'title' => 'Server to Monitor', - 'open' => 1, - 'items' => $items); - + 'open' => 1, + 'items' => $items); + /* The first Server at the list is the server first selected */ @@ -40,83 +51,90 @@ $_SESSION['monitor']['server_name'] = $servers[0]['server_name']; /* - Logmonitoring module -*/ -// aufr�umen + * Logmonitoring module + */ + +/* + * Clear and set the Navigation-Items + */ unset($items); -$items[] = array( 'title' => "Server Load", - 'target' => 'content', - 'link' => 'monitor/show_data.php?type=server_load'); +$items[] = array( 'title' => "Show Server State", + 'target' => 'content', + 'link' => 'monitor/show_sys_state.php?state=server'); -$items[] = array( 'title' => "Disk usage", - 'target' => 'content', - 'link' => 'monitor/show_data.php?type=disk_usage'); +$items[] = array( 'title' => "Show Server Load", + 'target' => 'content', + 'link' => 'monitor/show_data.php?type=server_load'); -$items[] = array( 'title' => "Memory usage", - 'target' => 'content', - 'link' => 'monitor/show_data.php?type=mem_usage'); +$items[] = array( 'title' => "Show Disk usage", + 'target' => 'content', + 'link' => 'monitor/show_data.php?type=disk_usage'); -$items[] = array( 'title' => "Services", - 'target' => 'content', - 'link' => 'monitor/show_data.php?type=services'); +$items[] = array( 'title' => "Show Memory usage", + 'target' => 'content', + 'link' => 'monitor/show_data.php?type=mem_usage'); + +$items[] = array( 'title' => "Show Services", + 'target' => 'content', + 'link' => 'monitor/show_data.php?type=services'); $module["nav"][] = array( 'title' => 'Monitoring', - 'open' => 1, - 'items' => $items); - -// aufr�umen -unset($items); - -$items[] = array( 'title' => "CPU", - 'target' => 'content', - 'link' => 'monitor/show_data.php?type=cpu_info'); - -$module["nav"][] = array( 'title' => 'System-Information', - 'open' => 1, - 'items' => $items); - -// aufr�umen -unset($items); - + 'open' => 1, + 'items' => $items); /* - Logmonitoring module -*/ + * Clear and set the Navigation-Items + */ +unset($items); -$items[] = array( 'title' => "Mail log", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_mail'); +$items[] = array( 'title' => "Show CPU info", + 'target' => 'content', + 'link' => 'monitor/show_data.php?type=cpu_info'); -$items[] = array( 'title' => "Mail warn", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_mail_warn'); +$module["nav"][] = array( 'title' => 'System-Information', + 'open' => 1, + 'items' => $items); -$items[] = array( 'title' => "Mail err", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_mail_err'); +/* + * Logmonitoring module + */ -$items[] = array( 'title' => "Messages", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_messages'); +/* + * Clear and set the Navigation-Items + */ +unset($items); -$items[] = array( 'title' => "Freshclam", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_freshclam'); +$items[] = array( 'title' => "Show Mail-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_mail'); -$items[] = array( 'title' => "Clamav", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_clamav'); +$items[] = array( 'title' => "Show Mail warn-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_mail_warn'); -$items[] = array( 'title' => "ISPConfig", - 'target' => 'content', - 'link' => 'monitor/show_log.php?log=log_ispconfig'); +$items[] = array( 'title' => "Show Mail err-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_mail_err'); + +$items[] = array( 'title' => "Show Messages-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_messages'); + +$items[] = array( 'title' => "Show Freshclam-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_freshclam'); + +$items[] = array( 'title' => "Show Clamav-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_clamav'); + +$items[] = array( 'title' => "Show ISPConfig-Log", + 'target' => 'content', + 'link' => 'monitor/show_log.php?log=log_ispconfig'); $module["nav"][] = array( 'title' => 'Logfiles', - 'open' => 1, - 'items' => $items); - -// aufr�umen -unset($items); + 'open' => 1, + 'items' => $items); ?> \ No newline at end of file -- Gitblit v1.9.1