gnanet / upc-maintenance-monitor

UPC Maintenance Monitor is an open source monitoring tool for scheduled maintenances of the hungarian cable provider UPC

Repository from Github https://github.comgnanet/upc-maintenance-monitorRepository from Github https://github.comgnanet/upc-maintenance-monitor

UPC Maintenance Monitor

NOT WORKING because UPC removed the HTML table, only a PDF can be downloaded

Please wait until i can finish the pdf-parser.

About

UPC Maintenance Monitor is an open source monitoring tool for scheduled maintenances of the hungarian cable provider UPC. It monitors the maintenance schedule webpage and emails you when a maintenance is scheduled for the town/city you provided.

See the example site: https://www.do01.r-us.hu/upc-karb/

Thanks and credits

Requirements

  • PHP 5.6+
  • OpenSSL
  • PHP must allow remote fopen.

Installation

Unpack, change some variables, setup a cronjob and go!

First get the code and unpack it to your webroot:

cd /var/www/html/
git clone https://github.com/gnanet/upc-maintenance-monitor.git

Create the database folder, outside of your webroot. If you create these inside your webroot, everybody can read them.

mkdir -p /var/www/upc-mm-db/
chown -R $wwwuser:$wwwgroup /var/www/upc-mm-db 

These files are used by the tool as database for checks, on first access they will be created.

Change the location of these files in lib/settings.php:

// set this to a location outside of your webroot so that it cannot be accessed via the internets.
$datastore = '/var/www/upc-mm-db';
$pre_check_file = $datastore.'/upc_pre_checks.json';
$check_file = $datastore.'/upc_checks.json';
$deleted_check_file = $datastore.'/upc_deleted_checks.json';

Also change the $current_domain variable, it is used in all the email addresses.

$current_domain = "www.do01.r-us.hu";

And $current_link, which may or may not be the same. It is used in the confirm and unsubscribe links, and depends on your webserver configuration. example.com/subdir here means your unsubscribe links will start https://example.com/subdir/unsubscribe.php.

$current_link = "www.do01.r-us.hu/upc-maintenance-monitor";

Visit https://$current_link/lib/telepulesnevek.php one time, to generate the autocomplete data.

Set up the cronjob to run once a day:

# /etc/cron.d/upc-maintenance-monitor
1 1 * * *    $wwwuser    $(which php) /var/www/html/upc-maintenance-monitor/cron.php >> /var/log/upc-maintenance-monitor.log 2>&1

The default timeout for checks is 2 seconds. If this is too fast for your internal services, this can be raised in the lib/settings.php file.

About

UPC Maintenance Monitor is an open source monitoring tool for scheduled maintenances of the hungarian cable provider UPC


Languages

Language:PHP 100.0%