Kentico CMS 7.0 Developer's Guide

Installing Health monitoring Windows service

Installing Health monitoring Windows service

Previous topic Next topic Mail us feedback on this topic!  

Installing Health monitoring Windows service

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Kentico CMS comes with a dedicated Windows service for Health monitoring purposes. This service can be used to additionally register performance counters and to write values to the Scheduled tasks in queue, E-mails in queue and Error e-mails in queue performance counters. As these three counters require database access to get their values, using the Windows service for their monitoring instead of the application itself can provide better performance.

 

The following text describes how the service can be installed. Please note that a specific configuration is also required for the service to write values to the mentioned performance counters. See Enabling Health monitoring for more details.

 

Installing and uninstalling the Health monitoring Windows service using Kentico CMS Service Manager

 

The easiest way to install or uninstall the Health monitoring Windows service is to use the Kentico Service Manager utility. The utility can either be launched from Kentico CMS program group in Windows Start menu, or from Kentico Installation Manager, as shown in the screenshot below.

 

devguide_clip1717

 

Installing the Health monitoring Windows service from the command line

 

To install the Windows service from the command line, you need to use Installer Tool (InstallUtil.exe), which is a native part of the .NET Framework. The following steps describe installation of the Windows service using the Installer Tool.

 

1. Open Windows command line (type cmd in the Start menu search box) and navigate to the .NET folder containing InstallUtil.exe (e.g. c:\Windows\Microsoft.NET\Framework64\v4.0.30319\).

 

2. Execute InstallUtil.exe from Windows command line with parameters as shown below. The parameters mean the following:

 

/webpath - path to the root folder of the Kentico CMS instance for that you want to install the Windows service.

second parameter - path to the HealthMonitoringService.exe file in the Bin folder inside application root (typically c:\inetpub\wwwroot\KenticoCMS\bin\HealthMonitoringService.exe).

/LogToConsole - optional parameter defining if installation progress will be logged to console.

/i - if this parameter is used, the Installer Tool performs installation of the Windows service.

 

InstallUtil /webpath="C:\inetpub\wwwroot\KenticoCMS" "c:\inetpub\wwwroot\KenticoCMS\bin\HealthMonitoringService.exe" /LogToConsole=true /i

 

3. To verify that the service is installed successfully, open Services management console (type services.msc into the Start menu search box). In the list of installed services, you should see the Kentico CMS Health Monitoring (<CMSApplicationName web.config key value>) service. The service is not running initially. To start it, click the Start Service button in the top toolbar, as highlighted in the screenshot below.

 

devguide_clip0187

 

Uninstalling the Health monitoring Windows service from the command line

 

Uninstalling the Health monitoring Windows service can be performed exactly the same way as described above, while you only need to use the /u parameter instead of /i at the end of the command:

 

InstallUtil /webpath="C:\inetpub\wwwroot\KenticoCMS" "c:\inetpub\wwwroot\KenticoCMS\bin\HealthMonitoringService.exe" /LogToConsole=true /u

 

After executing this command, the Health monitoring Windows service for the instance of Kentico CMS specified by the /webpath parameter will be uninstalled.