The Microsoft Windows Log Service has been replaced (from 2.11.0-funcrel) with a dedicated module embedded into CAST Console. This means that the check box to choose whether to install the Log Service in the node installer is no longer available. When performing an in-place upgrade to 2.11.0-funcrel (or any future release), the existing Microsoft Windows log service will be removed (if it exists on the machine).

Introduction

A dedicated Log Service is available for:

Its purpose is to remove the log management complexity from Console itself, optimize the parsing and analysis of log files, alert users about specific messages found during the analysis by the Node, and format each log file output regardless of its origin into a single simple format.

The Log Service is currently in beta and is available in ≥ 2.7.

Installation

The Log Service is provided with the following installers and is installed by ticking the option highlighted below (this option is NOT ticked by default):

What is installed?

The Log Service is installed:

  • as a dedicated Microsoft Windows service
  • set to start-up automatically
  • running with the Local Service account
  • running on port 8180

Configuration

The following properties files contain the Log Service configuration parameters (depending on your deployment mode):

%PROGRAMDATA%\CAST\AIP-Node\application-default.yml
%PROGRAMDATA%\CAST\AIP-Console-Standalone\application-standalone.yml

The following section controls the Log Service:

logservice:
  enabled: true
  url: http://localhost:8180
enabled

The enabled  key indicates to the associated Node (or Standalone mode Node) whether or not the Log Service is enabled (true) or disabled (false). When the service is selected for installation, this will be set to true:

  • When set to false, the Node will handle the job logs just like in older releases of Console.
  • When set to true, the Node will delegate the management of logs to the Log Service, by sending it a request whenever a Job Step is being run, pointing it to the main log.

You must ensure that the Log Service Windows Service is "running" when this key is set to true otherwise all jobs handled by the Node will fail.

urlThe URL key (only visible for a Node installed in Enterprise mode) indicates the URL/port of the Log service. It defaults to localhost:8180, which is the default URL and port on which the log service will be made available. You should NOT need to modify this and since the Node Service and Log Service are both on the same machine, it is not necessary to allow incoming requests to this port in your firewall.
alertPatterns

Starting 2.10 any custom patterns defined as described below will be ignored. Instead alert patterns are now available in the UI, see: Administration Center - Settings - Alert Settings. If you have configured custom patterns in this way in previous releases, CAST highly recommends that you retain them before upgrading to ≥ 2.10.

This key is not visible by default, however, by manually adding it in, it allows you to configure a list of specific log messages (or parts of log messages) that the log service should watch for while processing the logs. These log messages are then highlighted in Console whenever the Log Service "sees" them in any log files it is parsing.

alertPatterns requires three parameters:

  • - pattern: "<string>"
  • type: STRING|REGEX
  • matchCase: true|false 

For example, the following could be added:

logservice:
  enabled: true
  url: http://localhost:8180
  alertPatterns:
 	- pattern: "plugin has encountered the following error"
      type: STRING
      matchCase: false
 	- pattern: "JAVA124:Cannot resolve"
      type: STRING
      matchCase: false
 	- pattern: "DOTNET.0142:Dependency"
      type: STRING
      matchCase: false
 	- pattern: "DOTNET.0150:No definition found for the name"
      type: STRING
      matchCase: false
 	- pattern: "JAVA\\d{3}"
      type: REGEX
      matchCase: true

In the example below, the log message "JAVA124:Cannot resolve" has been identified by the Log Service and is highlighted in the alert/warning panel in the top right corner of Console

Behaviour during Job Execution

When the Log Service is enabled, the Node will send a request to the Log Service to monitor the main log of a Job Execution step, and then find additional logs to parse and analyze. This is mostly transparent and the log will still be visible in the Console log viewer in real time. The format for each log however changes to a more readable format and is kept coherent across different sub-processes run during an application analysis.

You must ensure that the Log Service Windows Service is "running" when the enabled  key in the .yml file is set to true otherwise all jobs handled by the Node will fail.

System alerts

If the Log Service is installed and enabled in the relevant .yml configuration file, but the Windows Service itself is stopped or has crashed, a System Alert will be displayed in CAST Console to alert you that an issue exists:

Disabling the Log Service

If you have installed an enabled the Log Service but wish to revert back to the initial log management provided by Console itself, update the application-default.yml / application-standalone.yml file, set the enabled  key to false and then restart the associated Node. You may also wish to:

  • stop the running Windows Service to release resources
  • and/or remove the Windows Service by running the following batch file depending on your deployment mode: 
    • %PROGRAMFILES%\CAST\AIP-Node\bin\console-log-service\tools\uninstall-service.bat
    • %PROGRAMFILES%\CAST\AIP-Console-Standalone\bin\console-log-service\tools\uninstall-service.bat

Installing the Log Service manually

If you have chosen not to install the Log Service during the installation process, but wish to use it, you will need to proceed as follows:

  • First manually install the Windows Service using the following batch file depending on your deployment mode: 
    • %PROGRAMFILES%\CAST\AIP-Node\bin\console-log-service\tools\install-service.bat
    • %PROGRAMFILES%\CAST\AIP-Console-Standalone\bin\console-log-service\tools\install-service.bat

If you do not wish to install the Log Service as a Windows Service, you can manually start the log service using the following file:

  • %PROGRAMFILES%\CAST\AIP-Node\bin\console-log-service\tools\start-log-service.bat
  • %PROGRAMFILES%\CAST\AIP-Console-Standalone\bin\console-log-service\tools\start-log-service.bat
  • Then update the following files depending on your deployment mode to set the enabled  key in the logservice section to true:
    • %PROGRAMDATA%\CAST\AIP-Node\application-default.yml
    • %PROGRAMDATA%\CAST\AIP-Console-Standalone\application-standalone.yml
  • Finally restart the Node to ensure the Log Service is fully enabled.