Go to file
Pepijn Over f1139abf13 trying out rst files dor readthedocs.org 2014-04-09 23:55:15 +02:00
cron fixing fatal error after deleting server; 2014-03-28 16:52:04 +01:00
docs trying out rst files dor readthedocs.org 2014-04-09 23:55:15 +02:00
src changing database version-check so if no changes have been made 2014-04-09 21:47:42 +02:00
static changing server-dropdown menu on view page to be inline 2014-04-05 16:04:25 +02:00
vendor/PHPMailer fixing fatal error after deleting server; 2014-03-28 16:52:04 +01:00
.gitattributes adding gitattributes file for export excludes 2014-03-18 22:09:44 +01:00
.gitignore bug in upgrade script causing it not to ask for new user; 2014-04-06 17:15:40 +02:00
CHANGELOG.md Adding chinese language to changelog and updating file header 2014-04-08 13:55:51 +02:00
CREDITS issue #37: adding jqplot to credits file 2014-03-27 01:26:50 +01:00
INSTALL.md adding version to footer; typos; 2014-04-06 17:57:20 +02:00
LICENSE moving changelog + license to root 2014-01-07 23:34:54 +01:00
Makefile bug in upgrade script causing it not to ask for new user; 2014-04-06 17:15:40 +02:00
README.md bumping php version required to 5.3.7 (issue #56) 2014-04-09 21:13:24 +02:00
config.php.sample adding gitattributes file for export excludes 2014-03-18 22:09:44 +01:00
index.php fixing fatal error after deleting server; 2014-03-28 16:52:04 +01:00
install.php fixing fatal error after deleting server; 2014-03-28 16:52:04 +01:00

README.md

PHP Server Monitor

Version 3.1.0-dev

PHP Server Monitor is a script that checks whether your websites and servers are up and running. It comes with a web based user interface where you can manage your services and websites, and you can manage users for each server with a mobile number and email address.

Features:

  • Monitor services and websites (see below).
  • Email and SMS notifications.
  • View history graphs of uptime and latency.
  • User authentication with 2 levels (administrator and regular user).
  • Logs of connection errors, outgoing emails and text messages.
  • Easy cronjob implementation to automatically check your servers.

There are two different ways to monitor a server:

  • Service

    A connection will be made to the entered ip or domain, on the given port. This way you can check if certain services on your machine are still running. To check your IMAP service for example, enter port 143.

  • Website

    You can enter a link to a website, it will then use cURL to open the website and check the HTTP status code. If the HTTP status code is in the 4xx range, it means an error occurred and the website is not accessible to the public. You can also set a regular expression to match for content on the page itself. If the regular expression returns no matches, the website is considered down. In both cases the script will return a "status offline", and will start sending out notifications.

Each server has its own settings regarding notification. You can choose for email notification or text message (SMS). The following SMS gateways are currently available:

Please note: for these gateways you will need an account with sufficient credits.

Download

The latest version can be downloaded from http://www.phpservermonitor.org/.

Requirements

  • PHP 5.3.7+
  • PHP cURL package
  • PHP PDO mysql driver

Install

See INSTALL.md file.

Contributing

The code is available from https://github.com/phpservermon/phpservermon. There is a master branch, which is stable and always reflects the latest release. The develop branch is used for ongoing development and should not be considered stable. If you would like to contribute a patch or feature, please fork the develop branch and send a pull request.

Changing the email or text message

Go to the folder "src/lang", open the language file that corresponds to the selected language (default is English ("en_US.lang.php")). Scroll all the way to the bottom until you spot this line:

 'notifications' => array(

After that you will see the lines that hold the notification messages. For example:

 'off_sms' => 'Server \'%LABEL%\' is DOWN: ip=%IP%, port=%PORT%. Error=%ERROR%',

The first part of this line, 'off_sms', is the name of the notification. You should not change this. The second part is the actual message. There are a few variables you can use in your message:

* %LABEL%				The name of the server
* %IP%					The ip of the server
* %PORT%				The port of the server
* %ERROR%				This one only works for the off_* messages and contains the error returned by the monitor

License

PHP Server Monitor is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PHP Server Monitor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with PHP Server Monitor. If not, see http://www.gnu.org/licenses/.