资源说明:netstat.php is a PHP script intended to provide a simplified, easily comprehensible and aesthetically pleasing overview of the online status of hosts and services.
\nnetstat.php - simple network status =================================== netstat.php is a PHP script intended to provide a simplified, easily comprehensible and aesthetically pleasing overview of the online status of hosts and services. Background story We use the usual suspects when it comes to network monitoring. There is lots of very good open source software which does all the tricks. However, we always missed a simple, intuitive interface with lots of green traffic lights which we could make available to our users (and clients). netstat.php only checks whether a specific port is open. It can be configured to check for instance whether some software is listening on port 25 (for SMTP) but it cannot tell whether this software is still working. Technically, netstat.php uses PHP's `fsockopen()` to create an Internet or *nix domain socket connection. Point is that we do not need more since we are running full-blown monitoring software anyway. In most cases, it is sufficient for my users to see a red light only when the network or the servers are down or the daemon is not running at all. And in general, an admin will (or at least *should*) know before users do. Screenshot ----------  This screenshot shows also a tooltip which is included as mouse-over in case of errors. The default layout of netstat.php 1.x is practically equivalent. For an HTML example see [netstat.php 0.x's main page](http://www.fam.tuwien.ac.at/~schamane/sysadmin/netstat/). Features -------- * Checks for open ports * Can do ICMP pings * Supports IPv6 * Aesthetically pleasing * Can display an optional alert message * Support for including alert messages in an RSS feed * Timeout (sensitivity) is adjustable * Self-contained but supports an extra configuration file * 2 versions available: * v0.x: Simple, straight forward, procedural code * v1.x (GitHub master): Still simple, but more features & more OO * HTML + CSS compatible with text only browsers (tested with lynx and links) * Shows timing diagnostics and error messages hidden in mouse-hovers * Free, open source, and GPL licensed * Still sticks to the KISS principle Instructions for use -------------------- netstat.php comes as a single PHP file. Download it, rename appropriately, edit the source code or create a configuration file to change settings, and have fun. Out of the box, the script looks for a configuration file named `netstat.conf.php`. It is recommended to put all settings into this file. ### netstat.conf.php Here is sort of a minimal example. For all supported settings see below. Status as of 2009-10-26 11:47
Mail services are currently down. On-site engineers are already investigating the cause of this unexpected interruption. Further information will be provided in about 30 minutes. In order to disable the inclusion of the file either rename it or change its permissions. All configuration variables --------------------------- Here is a full example of a configuration file (except for `$checks` and `$htmlheader`): "; // RSS header $rsslink = $_SERVER['SCRIPT_NAME'].'?noprogress'; // RSS alert link $rssdatetime = 'o-m-d H:i:s T'; // RSS date and/or time format // $htmlheader = ... see script for a full example; note that by default it // uses other variables, too: $title, $rssheader, $online, $offline $htmlfooter = "