From db3ef0ab29435055e5bc79334b20b5e069c6085f Mon Sep 17 00:00:00 2001 From: kc1awv Date: Sun, 8 Nov 2020 17:04:45 -0500 Subject: [PATCH] add healthcheck bump version --- CHANGELOG | 4 ++++ README.md | 13 +++++++++++++ check.php | 18 ++++++++++++++++++ include/config.inc.php.dist | 18 ++++++++++-------- index.php | 2 +- 5 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 check.php diff --git a/CHANGELOG b/CHANGELOG index 2472237..5e959ff 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v1.3.0 +* New mrefd version (v0.3.0) with updated interlinking and correct peer display +* Introducing healthchecks - read the README for information + v1.2.0 * Code cleanup - remove unneeded parts * Rename "Repeaters" as "Links" diff --git a/README.md b/README.md index f2989c4..5ab60d9 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,18 @@ sudo cp config.inc.php.dist config.inc.php - Logo file - place your logo in /images (SVG preferred) and edit config.ini.php to change the logo image. Defaults to the M17 logo. +### Health Checks +M17 Reflector Dashboard can now send health check data to the M17 Reflector team. +- Send an email to contact@m17.link with your reflector name and a contact email for the responsible party of the reflector. +- You will receive two emails when registration is completed, one to verify ownership of the contact email, and one with your GUID. +- Place the GUID you received into the config.inc.php line $CallHome['GUID'] line. +- Set up a cron job to run the check.php script every 5 minutes. +```bash +sudo crontab -e + +*/5 * * * * cd /var/www/html && php check.php # change the cd to wherever your system www root is located +``` + ### Files to edit - **include/config.inc.php** - ContactEmail - set this to the sysop's email address @@ -34,6 +46,7 @@ sudo cp config.inc.php.dist config.inc.php - Homepage - set this to your homepage, defaults to m17project - Logo - set this to the filename of your logo, defaults to M17 logo - LocalModification - set this to your local modification version number if you modify the main code + - CallHome GUID - Set this to your assigned Health Check GUID **Do not** enable the calling home feature. This feature is not appropriate for mrefd. diff --git a/check.php b/check.php new file mode 100644 index 0000000..e78e900 --- /dev/null +++ b/check.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/include/config.inc.php.dist b/include/config.inc.php.dist index 23776b2..86e937c 100644 --- a/include/config.inc.php.dist +++ b/include/config.inc.php.dist @@ -11,17 +11,19 @@ ShowLast3ByteOfIP */ $Service = array(); -$CallingHome = array(); +$CallHome = array(); $PageOptions = array(); -$PageOptions['ContactEmail'] = 'your_email'; // Support E-Mail address -$PageOptions['IPV4'] = 'refl_ipv4_address'; // Reflector IPV4 Address -$PageOptions['IPV6'] = 'refl_ipv6_address'; // Reflector IPV6 Address - if none use NONE -$PageOptions['Homepage'] = 'https://m17project.org'; // Link to homepage for logo -$PageOptions['Logo'] = 'm17_logo.svg'; // Logo image - SVG preferred - place in /images/ +$PageOptions['ContactEmail'] = 'your_email'; // Support E-Mail address +$PageOptions['IPV4'] = 'refl_ipv4_address'; // Reflector IPV4 Address +$PageOptions['IPV6'] = 'refl_ipv6_address'; // Reflector IPV6 Address - if none use NONE +$PageOptions['Homepage'] = 'https://m17project.org'; // Link to homepage for logo +$PageOptions['Logo'] = 'm17_logo.svg'; // Logo image - SVG preferred - place in /images/ -$PageOptions['LocalModification'] = ''; // If you modify the dashboard code, you can say so here - // with your mod version number, otherwise leave blank +$PageOptions['LocalModification'] = ''; // If you modify the dashboard code, you can say so here + // with your mod version number, otherwise leave blank + +$CallHome['GUID'] = ''; // Health Check GUID $PageOptions['PageRefreshActive'] = true; // Activate automatic refresh $PageOptions['PageRefreshDelay'] = '10000'; // Page refresh time in miliseconds diff --git a/index.php b/index.php index b664b7a..cce6352 100644 --- a/index.php +++ b/index.php @@ -111,7 +111,7 @@ $Reflector->LoadXML(); >Links (NodeCount(); ?>) >Peers (PeerCount(); ?>) - mrefd vGetVersion(); ?> - Dashboard v1.2.0 + mrefd vGetVersion(); ?> - Dashboard v1.3.0 Service uptime: GetServiceUptime()); ?>