Git Product home page Git Product logo

rz-monitor's Introduction

RZ Monitor

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.

SensioLabsInsight

Dependancies

  • PHP 5.4.3 min
  • cURL
  • Composer

Setup

  • Copy sites.default.json to sites.json and conf.default.json to conf.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.

Command-line usage

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

Browser usage

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.

Table view

Use Panic’s Status Board™ iOS app with your install folder URL.

Security

You can autorize only known users in rz-monitor web and table views, you just have to specify your accounts in conf.json.

{
    "sender":"[email protected]",
    "timezone":"Europe/Paris",
    "mail":[
        "[email protected]",
        "[email protected]"
    ],
    "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:[email protected]/rz-monitor.

We strongly recommand using HTTPS protocol to ensure a minimum security during authentification.

Mailer

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"
    }
}

Logs

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.

Author

REZO ZERO sarl 1 rue de l’abbé Rozier 69001 Lyon FRANCE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.