Contents

This utility will serve the purpose of being a watchdog on the health of the servers and components and take corrective actions if a crash is detected. The peer server and all the separate components which are launched as a separate JVM Process may crash due to of many reasons.

The utility on detecting such a crash executes a corrective action like restarting the components / servers or notifying administrator about it. This utility can be run in two different modes. 'Event Process' monitoring which monitors the state of the component JVM processes and restart the components if a crash is detected and 'Server Monitoring' which monitors the state of the servers and execute a script file if the server is not running.

Overview

This is a separate utility and files needed for this utility will be found under $Fiorano_home/esb/tools/monitor.

The following is the directory structure present under the above mentioned directory:

  • monitor/conf –contains the configurations to be used by the utility
  • monitor/lib – contains the necessary jars to run the utility
  • monitor/bin – contains the scripts to run the utility

Configuration Types

Logging configuration

The utility uses the 'java.util.logging.Logger' class for logging. The properties file 'logging.logging.properties' is located under the conf directory.  Log levels/ Log Handlers can be configured for the utility in this file. The logs go into the $Fiorano_home/esb/tools/monitor/bin/logs directory which is created at runtime.

Monitoring configuration

The monitoring.conf file is the configuration file for the utility. It is located under the conf directory. The file 'fiorano.conf' is the configuration file for the utility to run as a service using the Taunki Wrapper. Also present in the conf directory are the sample configuration files which contain details of the servers which need to be monitored (server1.conf and server2.conf).

Utility Scripts

The scripts to run this utility are located under bin directory. Following scripts are used to run the utility:

  • utility.bat/sh
    Execute this script to run the utility in a console.
  • FioranoMonitorService.bat/sh
    Use these scripts to run as a service.
  • Server1.bat/sh and server2.bat/sh
    These scripts are sample scripts provided with the utility to be executed once a server is detected to be not running.

Event Process Monitoring

To run the utility in Event Process Monitoring mode, the MONITORING_MODE property should be set to EVENT_PROCESS_MONITORING in the monitoring.conf.

The following properties present in monitoring.conf are applicable to Event Process Monitoring and are explained below:

Property Name

Description

MONITORING_MODE

Specifies the mode in which the utility will be run. Two valid values are SERVER_MONITORING and EVENT_PROCESS_MONITORING

Context_PROVIDER_URL

The External URL of the Enterprise Server as used by the Fiorano Studio to connect.

Context_INITIAL_CONTEXT_FACTORY

The Initial context factory implementation to use

FIORANO_USER

The username of the authenticated principal

FIORANO_PASSWORD

The credentials of the authenticated principal

EVENT_PROCESS_LIST

The list of Event Process GUID separated by commas which needs to be monitored. Special values like $ALL_RUNNING (All currently running event processes will be monitored) and $ALL_SAVED (All event processes saved in the repository) can be used.

EVENT_PROCESS_MONITOR_INTERVAL

The interval at which the status of the components will be checked.

Icon
  • Setting the parameter 'EVENT_PROCESS_MONITOR_INTERVAL' to a very less value will put considerable load on the server and may impact on the overall server performance. It is advised to have this value greater than 5 minutes.
  • This utility should be run per Enterprise server in the network to monitor all the applications managed by that Enterprise server, In case FES is run in HA Mode this utility should run on each servers monitoring over both the primary and secondary servers. One of the utility will fail to connect and the other one will successfully monitor the event process in a highly available cluster.

Server Monitoring

To run the utility in Server Monitoring mode, the MONITORING_MODE property should be set to 'SERVER_MONITORING' in the monitoring.conf file.

The following properties present in monitoring.conf are applicable to Server Monitoring:

Property Name

Description

MONITORING_MODE

Specifies the mode in which the utility will be run. Two valid values are SERVER_MONITORING and EVENT_PROCESS_MONITORING.


SERVERS_LIST

The list of space separated server configuration files to monitor.

SERVER_MONITOR_INTERVAL

The interval at which the health of the servers will be checked.

Icon
  • Setting the parameter 'SERVER_MONITOR_INTERVAL' to a very less value will put considerable load on the server and may impact on the overall server performance. It is advised to have this value greater than 5 minutes
  • The property SERVERS_LIST is a list of space separated server configuration files. These files contain the details of the server to be monitored. Sample configuration files server1.conf and server2.conf have been provided in the conf directory.

The properties present inside these configuration files are explained below:

Property Name

Description

SERVER_MODE

The mode in which the server is run. It could be in STANDALONE mode and HA Mode.

PROVIDER_URL

The internal JMS Server URL of the server.

INITIAL_CONTEXT_FACTORY

The implementation of the initial context to be used.

SECURITY_PRINCIPAL

The Username of the principal to authenticate.

SECURITY_CREDENTIALS

The credentials of the principal to authenticate.

BACKUP_PROVIDER_URL

If the server is run in HA Mode, the URL of the backup server.

BACKUP_INITIAL_CONTEXT_FACTORY

If the server is run in HA Mode, the initial context implementation to use

BACKUP_SECURITY_PRINCIPAL

If the server is run in HA Mode, the username of the principal to authenticate

BACKUP_SECURITY_CREDENTIALS

If the server is run in HA Mode, the credentials of the principal to authenticate

COMMAND_PATH

The Script File to execute the corrective actions. The script file could start the server up/start an event process using the CLI/execute notification with custom written code and so on.

Icon
  • The Command_Path property is the absolute path of the script which should be run in event of a server crash. Sample scripts, that is, server.bat/sh and server2.bat/sh have been provided with this utility. The profile and the mode of the server to be monitored should be specified in these scripts.
  • This utility will run once for a platform specifying the list of the servers to be monitored and the server configurations. The HA server can be configured as a single configuration and the server unavailability is defined as neither of the servers are up. So this utility will not be starting up one of the servers as long as the other HA server is ACTIVE.

Running the Utility

After configuring the utility, it can be run via the shell using the utility.bat/sh script file.

The fiorano.conf file is the configuration file for the utility to run as a service using the Taunki Wrapper. To run the utility as a Windows service or as a Linux Daemon service, follow the steps given below.

On Windows

  • Execute the script FioranoMonitorService.bat present in the bin directory with the argument install to install the utility as a service.
  • Execute the script FioranoMonitorService.bat present in the bin directory with the argument uninstall to uninstall the utility as a service.

On Linux

  1. Edit the script FioranoMonitorService.sh to set the absolute path of FIORANO_HOME and JAVA_HOME and save.
  2. Copy the file FioranoMonitorService.sh to /etc/init.d directory.
  3. Execute command chkconfig –add FioranoMonitorService.sh
  4. Assign executable permissions to /etc/int.d/FioranoMonitorService.sh start/stop/status and so on.
  • To uninstall the utility as service, go to '/etc/init.d' directory and type the following commands:
    • chkconfig --del FioranoMonitorService.sh
    • unlink FioranoMonitorService.sh
Icon
  • If chkconfig command is not supported by the Operating System, then install the utility as a service using the following command:
    ln -s $FIORANO_HOME/esb/tools/monitor/bin/FioranoMonitorService.sh /etc/rc5.d/S23FioranoMonitorService.sh

    Icon

    The script file need not be copied to /etc/rc5.d directory in this case.

  • 'rc5.d' refers to run level 5 and 'S23' specifies that the service has a priority of 23 when the system starts up.
  • To uninstall the service type the following command:
    unlink /etc/rc5.d/S23FioranoMonitorService.sh

On Mac OS X

  1. Edit the script FioranoMonitoringService to set the absolute path of FIORANO_HOME and JAVA_HOME and save.
  2. Open com.fiorano.monitorservice.plist.
  3. Give the absolute path of FioranoMonitorService.sh for the first <string> node of <ProgramArguments> key.
  4. Copy the com.fiorano.monitorservice to /System/Library/LaunchAgents.
  5. To start FioranoMonitoringService, restart the system or Type "Launchctl load /System/Library/LaunchAgents/com.fiorano.monitorservice.plist"
  • To check status run "./FioranoMonitorService.sh status" in %FIORANO_HOME%/esb/tools/monitor/bin.
  • To stop run "./FioranoMonitorService.sh stop" in %FIORANO_HOME%/esb/tools/monitor/bin.
  • To uninstall as service type "Launchctl unload /System/Library/LaunchAgents/com.fiorano.monitorservice.plist" in terminal and remove com.fiorano.monitorservice.plist from /System/Library/LaunchAgents.
Icon

The statements logged on the console are diverted to the log file FioranoMonitoring.log which gets created in the $FioranoHome/esb/tools/monitor/bin/service directory. This directory is created once the service is installed.

Adaptavist ThemeBuilder EngineAtlassian Confluence