Skip to content
module.conf.php 3.25 KiB
Newer Older
tbrehm's avatar
tbrehm committed
<?php

tbrehm's avatar
tbrehm committed
$module["name"] 		= "monitor";
$module["title"] 		= "Monitor";
$module["template"] 	= "module.tpl.htm";
$module["tab_width"]    = '';
$module["startpage"] 	= "monitor/system.php?type=overview";
tbrehm's avatar
tbrehm committed

/*
 We need all the available servers on the left navigation.
 So fetch them from the database and add then to the navigation as dropdown-list
tbrehm's avatar
tbrehm committed
*/
$servers = $app->db->queryAllRecords("SELECT server_id, server_name FROM server order by server_name");
tbrehm's avatar
tbrehm committed

$dropDown = "<select id='server_id' onchange=\"loadContent('monitor/show_data.php?type=overview&server=' + document.getElementById('server_id').value);\">";
foreach ($servers as $server)
{
  $dropDown .= "<option value='" . $server['server_id'] . "|" . $server['server_name'] . "'>" . $server['server_name'] . "</option>";
}
$dropDown .= "</select>";

/*
 Now add them as dropdown to the navigation
 */
$items[] = array( 'title' 	=> $dropDown,
		'target' 	=> '', // no action!
		'link'	=> '');   // no action!

$module["nav"][] = array(	'title'	=> 'Server to Monitor',
		'open' 	=> 1,
		'items'	=> $items);
		
/*
  The first Server at the list is the server first selected
 */
$_SESSION['monitor']['server_id']   = $servers[0]['server_id'];
$_SESSION['monitor']['server_name'] = $servers[0]['server_name'];
tbrehm's avatar
tbrehm committed

/*
	Logmonitoring module
*/
// aufrumen
unset($items);
$items[] = array( 'title' 	=> "Server Load",
tbrehm's avatar
tbrehm committed
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_data.php?type=server_load');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Disk usage",
tbrehm's avatar
tbrehm committed
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_data.php?type=disk_usage');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Memory usage",
tbrehm's avatar
tbrehm committed
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_data.php?type=mem_usage');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Services",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_data.php?type=services');
$module["nav"][] = array(	'title'	=> 'Monitoring',
tbrehm's avatar
tbrehm committed
							'open' 	=> 1,
							'items'	=> $items);

// aufrumen
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);

// aufrumen
unset($items);


tbrehm's avatar
tbrehm committed
/*
	Logmonitoring module
*/

$items[] = array( 'title' 	=> "Mail log",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_mail');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Mail warn",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_mail_warn');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Mail err",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_mail_err');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Messages",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_messages');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Freshclam",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_freshclam');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "Clamav",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_clamav');
tbrehm's avatar
tbrehm committed

$items[] = array( 'title' 	=> "ISPConfig",
				  'target' 	=> 'content',
				  'link'	=> 'monitor/show_log.php?log=log_ispconfig');
tbrehm's avatar
tbrehm committed

$module["nav"][] = array(	'title'	=> 'Logfiles',
							'open' 	=> 1,
							'items'	=> $items);

// aufrumen
unset($items);
?>