RZ Monitor is a command-line tool made to watch website using RZ-CMS and others too… It's based on cURL and it downloads each url and searches for CMS version. It can send a notification email when a website cannot be accessed and when it is reachable again.
- PHP 5.4.3 min
- cURL
- Composer
- Copy
sites.default.json
tosites.json
andconf.default.json
toconf.json
. - Write your emails and users/passwords in conf.json file.
- Setup your URLs in site.json.
- Run
composer install --no-dev
to install dependencies and create autoloader - Run
composer dumpautoload -o
to get better autoload performances.
cd /yourinstallfolder
php index.php
If you want to setup a automatic crawl, you can use crontab
to execute index.php periodically.
# Check websites every 10 minutes
*/10 * * * * /usr/bin/php /path/to/index.php
Copy Apache configuration from apache.conf
file into your virtual host config (good method),
or just use .htaccess
files to securize and enable url-rewriting (deprecated method).
Then go to your install folder from your internet browser: https://my-domain.com/rz-monitor
.
Use Panic’s Status Board™ iOS app with your install folder URL.
You can autorize only known users in rz-monitor web and table views,
you just have to specify your accounts in conf.json
.
{
"sender":"mynotification@email.com",
"timezone":"Europe/Paris",
"mail":[
"mynotification@email.com",
"mysecondnotification@email.com"
],
"users": {
"firstuser": "password",
"seconduser": "password"
}
}
Then a user and password pair will be asked for next connexion.
If you are using Panic’s Status Board™ just use inline authentification
in your URL : https://user:password@my-domain.com/rz-monitor
.
We strongly recommand using HTTPS protocol to ensure a minimum security during authentification.
You can use a different mailer system from your PHP server.
Just add a little configuration to conf/conf.json
file for
your external SMTP service and RZMonitor will use it instead of sendmail command.
For example, here is a configured Mandrill SMTP service.
{
"mailer": {
"type": "smtp",
"host": "smtp.mandrillapp.com",
"port": 587,
"encryption": false,
"username": "your-username",
"password": "your-password"
}
}
RZMonitor uses Monolog to build a log file in data/monitor.log
. It will write every connections
and site status changes. Do not forget to use logrotate
process on this file.
REZO ZERO sarl 1 rue de l’abbé Rozier 69001 Lyon FRANCE