Website Monitor

This feature allows you to monitor your website. It will use cURL to open the website and check the HTTP status code (see https://en.wikipedia.org/wiki/List_of_HTTP_status_codes_for_details for details). If the HTTP status code is in the 4xx range, it means an error occurred and the website is not accessible to the public. In that case the script will return a “status offline”, and will start sending out notifications.

website_monitor

Each site has the option to enable this feature and also to receive notifications by email if the site is offline. We will receive a maximum of 10 emails if the site is offline to avoid flooding the inbox.

We will also see the offline history with the error returned by the website. After deleting the history the number of emails sent will be initialized so we will receive emails if the site is offline again.

This feature requires a cron task to be launched (in the site with Control Center installed) as typically needs to be send every few minutes (I recommend a value of ten minutes). Many hosting providers allows you to configure a cron easily but you can also doing it adding a new task to crontab from command line (Linux servers). Depending of your Joomla version the syntax vary:

  • Joomla 3: php /path_to_your_joomla_installation/cli/ControlCenterServerStatusCommandJ3.php
  • Joomla 4: php /path_to_your_joomla_installation/cli/joomla.php controlcenter:monitor

After launching it you will see the following: website_monitor_launched

*For those hosting providers allowing only http urls in cron,we can change the file to something like this (only for Joomla 3): http_queries_cron_service and then use the following http url: https://yourwebsite.com/cli/ControlCenterServerStatusCommandJ3.php?secret=yoursecret

Thanks Ivan for sharing this!!