Skip to content

Allows you to monitor one or more sites. The script sends short email notifications which can be forwarded to a cell phone.

Notifications You must be signed in to change notification settings

orbisius/site-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

site-monitor

Site Monitor

Description

The script will check if one or more sites are online and will send you a notification. It will stop after the maximum alerts is reached. At some point if the site is still down the notifications will reset and you will start receiving them again. When the site comes back online the flag file is deleted and you'll get another notification. The notification emails are combined into one so you won't get multiple emails.

This script is useful when you have multiple domains or manage domains on behalf of your clients. You want to be the first one to know when a website is down so you can quickly fix it.

Video Demo: http://www.youtube.com/watch?v=Sw93JUc55Tc

Usage:

  1. Download site-monitor in a folder of your choice git clone https://github.com/orbisius/site-monitor.git

  2. Edit the config.php file and add your email(s) in APP_ALERT_EMAIL field. Some carriers allow you to send an email to a specific email address which can be converted into text. e.g. [email protected] for Telus customers.

  3. Create a text file called: sites.txt in the same folder where this script resides. You can check sites.sample.txt for some ideas. Each site has to be on its own line. Comments are allowed and they should be prefixed by # (pound) sign. Empty lines are skipped.

  4. Setup a cron job. Running the script from console (cli) is the recommended approach as opposed to using lynx because if your site is down the monitoring script won't get executed.

Runs this script from a cron job every 5 minutes. */5 0-23 * * * /usr/bin/php /path/to/monitor.php

  1. If you run into issues or want to suggest a feature submit a ticket at: https://github.com/orbisius/site-monitor/issues

  2. If you are receiving multiple emails (more than the limit) please create a tmp folder in the same folder where the script resides. Make sure it has write permissions.

Svetoslav Marinov (SLAVI) http://orbisius.com copyright (c) 2013, Svetoslav (SLAVI) Marinov license LGPL

About

Allows you to monitor one or more sites. The script sends short email notifications which can be forwarded to a cell phone.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages