PHP Server Monitor is an open source tool that checks whether the servers on your list are up and running on the selected ports. It comes with a web based user interface where you can add and remove servers or websites from the MySQL database, and you can manage users for each server with a mobile number and email address.
It supports both services and websites. On the “Add server” page, you can choose whether it is a “service” or a “website”:
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.
You can enter a link to a website (for example http://sourceforge.net/index.php), it will use cURL to open the website and check the HTTP status code (see http://en.wikipedia.org/wiki/List_of_HTTP_status_codes for details). 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 certain 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 it’s own settings regarding notification. You can choose for email notification or text message (SMS). The following SMS gateways are currently available (for these gateways you need an account with sufficient credits):
- 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
- Textmarketer – http://www.textmarketer.co.uk
If logging is enabled in the configuration, it will log any connection errors, emails and text messages sent. The latest log records will be displayed on your web interface. The cron/status.cron.php can be added as a cronjob which will keep the server status up to date.
- PHP 5.3+
- PHP packages: cURL, MySQL
- MySQL Database
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/.