X
Closing this message and/or accessing our website tells us you are happy to receive all cookies on the ClearPeople website.
However, if you would like to, you can change your cookies settings at any time.

Monitoring Sitecore applications is an absolute necessity if we need to pro-actively deal with issues that occur on applications before the client reports them. Sitecore does log everything to log files using Log4Net, which is really useful for monitoring the application health. But the issue is we need to somehow automate the log files analysis to find the right information from the logs which are quite descriptive and provide a way to send alerts to the support team when it finds any errors. Also it should be easy to configure the tool so that it gets the exact information we would like to see.

The list tasks the monitoring tool should perform at a bare minimum to monitor the Sitecore applications are:
  • Analyse the Sitecore logs to get the list of all log entries
  • Group them based on the Log level
  • Ability to only analyse the log files within a certain time range, as there might be several  log files
  • Ability to configure what log level to look for

For example, we should be able to configure the tool to get all the Errors that occurred within the last two hours and send alerts to a configurable list of persons.
The alerts could be just normal e-mail alerts (in case of intranets, these are not publically visible) or a web page highlighting the recent errors that occurred (we can then configure tools like PingDom, Periscope etc., to look for particular text on the Error page and send alerts).

Diagnostics Module:

I have been working on creating a Sitecore module for monitoring Sitecore applications to try to achieve this. The module is available on Sitecore Market Place (https://marketplace.sitecore.net/Modules/CP_Diagnostics_-_Log_Analyzer_Scheduled_Task.aspx) and the source code is available on GitHub (https://github.com/RavikiranGokaraju/Sitecore.Diagnostics/)

This module enables the easy setup of a Sitecore scheduled task which will analyse the Sitecore log entries created during a time frame and sends an email with the log entries found with a specific log level to recipients. The time frame, log level, recipients are all configurable.

Follow these steps to setup the module:
  • Download and Install the Sitecore package
  • Rename the config file from "CP.Diagnostics.Sitecore.LogAnalyzerTask.config.example"  to "CP.Diagnostics.Sitecore.LogAnalyzerTask.config".
  • Update the config file with settings appropriate to your Sitecore instance (See comments in the config file for more detail)
  • Restart the Sitecore application
I am still working on improving this module to add more functionality, to allow filtering the log entries based on a regular expression which might be helpful if you are looking for a specific entry and add an Error listing page which can be used by other web monitoring tools and for getting the required information from Sitecore logs easily.

I will keep you posted on any improvements for this module.

Author bio

Comments


comments powered by Disqus

Related Articles

Sign up to our Newsletter

Every now and then, we'd like to send you information that delivers, develops and promotes our products and services that are relevant to you. Submitting your details tells us that you're OK with this and you also agree to our Privacy & Cookies policy. You can, of course, opt out of these communications at any time.