FREE Magento Extension – Monitor /var/report Error files

created April 14, 2011, last updated August 11, 2011.

.
closeThis post was last updated 6 years 5 months 8 days ago, some of the information contained here may no longer be actual and any referenced software versions may have been updated!

Magento BuyXGetYFree ExtensionI recently experienced an interesting problem with a Magento web store that went unnoticed because although the store appeared to be functioning perfectly well I was not aware of error reports being created in the Magento /var/report folder. I don’t regularly check this folder and had I known about the error reports that were rapidly accumulating there I could have solved the problem with the store quicker!

I thought it would be a good idea to monitor this folder for new files and to be alerted by email when a change in the folder contents is detected, i.e. when a new error report is generated so that I am aware of Magento errors as soon as they happen.

I put together a quick PHP script and then converted it into a Magento Extension that runs as part of the magento scheduled cron tasks. The extension will check the /var/report folder every hour and send an email alert when a change in this folder is detected with the latest error report file attached.

The extension uses the Magento scheduler which should be enabled. And the Magento scheduler script cron.php should be configured to run periodically in your crontab.

To install the extension, copy the extension app folder to your magento store app folder. Refresh your magento cache. Logout from admin, and login again. Check out your var/reports folder, if you have not checked it for a while there could be reports there, it is quite safe to remove old reports.

The first time the extension runs you will receive an email if there are existing files in your var/report folder showing the total number of reports with the newest report attached. After that you will be alerted each time new reports are detected.

Configure the extension with a valid email addresses, in the My Extensions, Monitor Reports admin section.

Tested with Magento 1.3.x, 1.5.x

Monitor Reports Extension configuration screen

 

Download the extension here.

 

Comments

  1. PAJ says:

    Seems to be a bug in the extension when more than one new report is present, the report is not sent as an attachment correctly.