Файл: wmon_dist/docs/index.html
Строк: 397
<?php
<!doctype html>
<!--[if IE 6 ]><html lang="en-us" class="ie6"> <![endif]-->
<!--[if IE 7 ]><html lang="en-us" class="ie7"> <![endif]-->
<!--[if IE 8 ]><html lang="en-us" class="ie8"> <![endif]-->
<!--[if (gt IE 7)|!(IE)]><!-->
<html lang="en-us"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>wmon - web server monitor</title>
<meta name="description" content="">
<meta name="author" content="Radovan Lozej">
<meta name="copyright" content="Radovan Lozej">
<meta name="generator" content="Documenter v1.6 http://rxa.li/documenter">
<meta name="date" content="2013-03-20T00:00:00+01:00">
<link rel="stylesheet" href="css/documenter_style.css" media="all">
<script src="js/jquery.1.6.4.js"></script>
<script src="js/jquery.scrollTo-1.4.2-min.js"></script>
<script src="js/jquery.easing.js"></script>
<script>document.createElement('section');var duration=500,easing='swing';</script>
<script src="js/script.js"></script>
<style>
html{background-color:#FFFFFF;color:#383838;}
::-moz-selection{background:#444444;color:#DDDDDD;}
::selection{background:#444444;color:#DDDDDD;}
#documenter_sidebar #documenter_logo{background-image:url();}
a{color:#0000FF;}
hr{border-top:1px solid #EBEBEB;border-bottom:1px solid #FFFFFF;}
#documenter_sidebar, #documenter_sidebar ol a{background-color:#DDDDDD;color:#222222;}
#documenter_sidebar ol a{-webkit-text-shadow:1px 1px 0px #EEEEEE;-moz-text-shadow:1px 1px 0px #EEEEEE;text-shadow:1px 1px 0px #EEEEEE;}
#documenter_sidebar ol{border-top:1px solid #AAAAAA;}
#documenter_sidebar ol a{border-top:1px solid #EEEEEE;border-bottom:1px solid #AAAAAA;color:#444444;}
#documenter_sidebar ol a:hover{background:#444444;color:#DDDDDD;border-top:1px solid #444444;}
#documenter_sidebar ol a.current{background:#444444;color:#DDDDDD;border-top:1px solid #444444;}
#documenter_copyright{display:block !important;visibility:visible !important;}
</style>
</head>
<body>
<div id="documenter_sidebar">
<a href="#documenter_cover" id="documenter_logo"></a>
<ol id="documenter_nav">
<li><a class="current" href="#documenter_cover">Start</a></li>
<li><a href="#about">About</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#settings">Settings</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#change_log">Change Log</a></li>
<li><a href="#credits">Credits</a></li>
</ol>
<div id="documenter_copyright">Copyright Radovan Lozej 2013<br>
made with the <a href="http://rxa.li/documenter">Documenter v1.6</a>
</div>
</div>
<div id="documenter_content">
<section id="documenter_cover"><h1>wmon</h1><h2>web server monitor</h2><hr><ul><li>Created: 0823/2011</li><li>latest Update: 03/20/2013</li><li>By: Radovan Lozej</li><li><a href=""></a></li><li>Email: <a href="mailto:radovan.lozej@gmail.com">radovan.lozej@gmail.com</a></li></ul></section><section id="about">
<h3>About</h3><hr class="notop">
<p>
wmon is web based server monitor for one or more Linux servers.</p>
</section>
<section id="features">
<h3>Features</h3><hr class="notop">
<ul>
<li>
monitor one or more servers from one location</li>
<li>
detailed load chart with zooming option and touch support</li>
<li>
services status and changes and email notifications</li>
<li>
internet connection checking</li>
<li>
top processes at any pointed time</li>
<li>
disks usage and email notifications when space limit reached</li>
<li>
responsive web layout (desktop/mobile)</li>
</ul>
</section>
<section id="requirements">
<h3>Requirements</h3><hr class="notop">
<ul>
<li>
Linux server</li>
<li>
php 5.x ( including php5-cli )</li>
<li>
crontab</li>
<li>
browser that supports canvas (Works in all major browsers except IE less then version 9)</li>
</ul>
</section>
<section id="installation">
<h3>Installation</h3><hr class="notop">
<p>
Extract the zip file to web path you desire. Edit the config.php and set 'log' setting to some writable location,<br>
for instance to '/tmp/wmon.log'.After that you need to add wmon to crontab this way:<br>
<br>
<code> */5 * * * * /path/to/php /path/to/wmon/index.php &> /dev/null</code><br>
<br>
You can find /path/to/php executable with "which php" executing in command line. Navigate to your web browser and you should see wmon report. Chart may be empty on start, because measurements are made every 5min and there is not anything to draw jet. Give it some time or run crontab command manually to get some data quicker (must be run in command line). To include other servers to report, just repeat the same installations steps for each machine and then add their uri to config.php to external property (see example in the file).<br>
<br>
Email notifiacations are sent by native php mail function, so your server must be properly setup to send it correctly, otherwhise it will probably end up in spam or not be sent. If you desire you can use your own method (smtp or what ever) for mail sending, just search for "send mail" in index.php and replace it with you own function.</p>
</section>
<section id="settings">
<h3>Settings</h3><hr class="notop">
<p>
All wmon settings are in config.php file.</p>
<ul>
<li>
<strong>hostname</strong> - default hostname of your choice</li>
<li>
<strong>log</strong> - path to log file</li>
<li>
<strong>period</strong> - max number of measurements shown on chart => */5min * 2016 => 7 days</li>
<li>
<strong>services</strong> - array of services you want to monitor array('name of your choice','daemon name'). For internet connection checking add service with name "internet" and empty string for daemon name.</li>
<li>
<strong>partitions_exclude</strong> - partitions you want to remove from showing</li>
<li>
<strong>external</strong> - an array of external wmon reports you want to show on the same page ( 'hostname of your choice'=>'web url to another wmon report')</li>
<li>
<strong>email </strong>- your email for notifications, empty or not set disables notifications</li>
<li>
<strong>partition_space_alert</strong> - percent when you get notified about disk space usage</li>
</ul>
</section>
<section id="usage">
<h3>Usage</h3><hr class="notop">
<p>
Load chart displays 3 series of data representing 1min, 5min and 15 min load average. Mouse over chart will give you detailed measurements of each load average numbers on top left corner. In the same time top processes table below turns yellow, what will show you top processes for the pointed time. When the table is white it show the current data form last refresh of the page. Service status changes are also indicated on chart. When the red annotation show it means that some of services changed state. Mouse over the annotation show you the exact services status in pointed time. Chart allows also vertical and horizontal zooming, by mouse click and drag over over it. Double click will zoom out.<br>
<br>
Chart data is stored in cvs format and its size will grow to more then 200kb in 7 days. This can relay slow chart loading, so it is advised to run web server with gzip or deflate support which compress files up to 10 times during transfer.<br>
<br>
Note:<br>
Notifications and status changes are stored by position index in config.php so if you are re-ordering services you may get wrong notifications or statues in web view. This will only happen right after your change and will go away after some time. Good pratice is to add new services on the end. Once it is setup, configuration usually don't change a lot so it shudn't be a problem.</p>
</section>
<section id="change_log">
<h3>Change Log</h3><hr class="notop">
<p>
2.0 - Mar. 2013<br>
- responsive layout<br>
- updated chart libn now supports touch events<br>
- email notifications on service status changes and on disk usage limits<br>
- added internet connection checking<br>
- various fixes<br>
<br>
1.0 - Aug. 2011<br>
- first release</p>
</section>
<section id="credits">
<h3>Credits</h3><hr class="notop">
<p>
dygraphs chart - http://dygraphs.com/<br>
mootools javascript framework - http://mootools.net/<br>
Mustache.php<br>
twitter bootstrap - http://twitter.github.com/bootstrap/<br>
favicon.ico by Tango project</p>
</section>
</div>
</body>
</html>
?>