phpservermon/README.md

107 lines
3.9 KiB
Markdown
Raw Normal View History

2014-01-07 21:20:43 +01:00
# PHP Server Monitor
2014-01-07 20:24:48 +01:00
Version 3.0.0
2014-02-10 23:57:40 +01:00
PHP Server Monitor is a script that checks whether your websites and servers are up and running.
2014-04-05 15:18:28 +02:00
It comes with a web based user interface where you can manage your services and websites,
2014-01-07 20:24:48 +01:00
and you can manage users for each server with a mobile number and email address.
2014-04-05 15:18:28 +02:00
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.
2014-02-10 23:57:40 +01:00
There are two different ways to monitor a server:
2014-01-07 21:20:43 +01:00
* 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
2014-02-10 23:57:40 +01:00
You can enter a link to a website, it will then use cURL to open the website and check the HTTP status code.
2014-01-12 14:30:48 +01:00
If the HTTP status code is in the 4xx range, it means an error occurred and the website is not accessible to the public.
2014-02-10 23:57:40 +01:00
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.
2014-01-07 20:24:48 +01:00
Each server has it's own settings regarding notification.
2014-02-08 19:36:17 +01:00
You can choose for email notification or text message (SMS).
The following SMS gateways are currently available:
2014-01-07 21:20:43 +01:00
* Mollie - <http://www.mollie.nl>
* Spryng - <http://www.spryng.nl>
* Inetworx - <http://www.inetworx.ch>
* Clickatell - <https://www.clickatell.com>
* Mosms - <http://www.mosms.com>
2014-01-21 23:09:51 +01:00
* Textmarketer - <http://www.textmarketer.co.uk>
2014-01-07 21:20:43 +01:00
2014-04-05 15:18:28 +02:00
Please note: for these gateways you will need an account with sufficient credits.
2014-01-07 20:24:48 +01:00
2014-02-08 19:36:17 +01:00
2014-03-13 20:21:18 +01:00
## Download
2014-01-07 20:24:48 +01:00
The latest version can be downloaded from <http://www.phpservermonitor.org/>.
2014-01-07 20:24:48 +01:00
2014-03-13 20:21:18 +01:00
## Requirements
2014-01-07 20:24:48 +01:00
2014-02-08 19:36:17 +01:00
* PHP 5.3+
* PHP cURL package
* PHP PDO mysql driver
2014-01-07 20:24:48 +01:00
2014-03-13 20:21:18 +01:00
## Install
2014-01-07 20:24:48 +01:00
See INSTALL.md file.
2014-01-07 21:20:43 +01:00
2014-03-13 20:21:18 +01:00
## Contributing
2014-01-07 21:20:43 +01:00
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.
2014-01-07 21:20:43 +01:00
### Changing the email or text message
2014-01-07 21:20:43 +01:00
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:
2014-01-07 21:20:43 +01:00
'notifications' => array(
After that you will see the lines that hold the notification messages. For example:
2014-01-07 21:20:43 +01:00
'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
2014-01-07 21:20:43 +01:00
## 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/>.