FME Flow: 2024.2
processMonitorConfigEngines.txt
#########################################
# Process Monitor Config File Parameters.
#########################################
################ WARNING ###############
# It is strongly advised not to make any
# changes to these configurations, as unexpected results may occur.
# Any changes to these configurations should occur only as directed in
# documentation that originates from Safe Software, or from Safe technical
# support. Any changes made to this file do not take effect unless
# NODE_OVERWRITE is set to TRUE.
################ WARNING ###############
#
# The Process Monitor program is started from the command line and takes one argument.
# This argument is the pathname of the configuration parameter file.
#
# Configuration parameters are used to set various operating characteristics
# of the Process Monitor. Values for these parameters are read in from this file
# when the Process Monitor is started. This configuration parameter file is an
# ASCII text file containing one parameter assignment on each line. Each
# assignment consists of a parameter name followed by an equal-sign followed
# by the parameter's value.
#
# For example, the line:
#
# NODE_ADMIN_PORT=7500
#
# assigns the "NODE_ADMIN_PORT" parameter a value of "7500".
#
# The Process Monitor is case-sensitive to parameter names. Blank lines and lines
# beginning with the "#" character are treated as comments and are ignored.
#
# Changes to any parameter value in this file will take effect only upon
# subsequent restart of the Process Monitor.
#
# The following parameters must be present in the config file and named exactly
# as shown:
#
#--------------------------------------
# Log File
#--------------------------------------
#
# LOG_CONFIG_PATH - The folder path that contains the log file configuration.
#
# LOG_FILE_NAME - The path name of the message log file.
#
#--------------------------------------
# Node Management
#--------------------------------------
#
# NODE_ADMIN_PORT - TCP/IP port number on which to listen for requests
#
# NODE_NAME - The name used by this FME Server node to identify itself. If no value is assigned, the node takes
# the host name of the system on which it is running.
#
# NODE_DESCRIPTION - The string used by this FME Server node to describe itself. If no value is assigned, the node's
# description is the empty string.
#
# NODE_HOST - The host name of the system on which it is running.
#
# NODE_ENGINE_ADMIN_PORT - The Engine administration port used to manage ENGINE processes.
#
# NODE_OVERWRITE - If "true" then process configurations specified in this file will always overwrite those
# already specified in the database. If "false" or missing, the process configurations will
# only be added when the node hasn't already been added part of deployment.
#
# NODE_MANAGED - Default is "true". If "true" the process definitions and node host entries are persisted, otherwise "false".
#
# FME Engines can be added or removed from nodes. New Engine process configurations are defined by
# Engine templates which specify the START, STOP and PARAMS commands.
#
# TEMPLATE_START_ENGINE=<startcommand>
# TEMPLATE_STOP_ENGINE=<stopcommand>
# TEMPLATE_PARAMS_ENGINE=<optionalparams>
#
# To prevent duplications, process configurations may reference Engine template start commands as
# macros by wrapping parameters with ! characters.
#
# For example:
# START_ENGINE_Engine1=!TEMPLATE_START_ENGINE!
# STOP_ENGINE_Engine1=!TEMPLATE_STOP_ENGINE!
# PARAMS_ENGINE_Engine1=!TEMPLATE_PARAMS_ENGINE!
#
# Process Configuration
# ---------------------
#
# The next parameters are those that define the actual commands that the Process Monitor should
# start in a separate process and monitor. The format for these command parameters is:
#
# START_<processtype>_<processname>=<startcommand>
# STOP_<processtype>_<processname>=<stopcommand>
# PARAMS_<processtype>_<processname>=[log=<boolean>]|[attempts=<integer>]|[norestart=<integer>]|[wait=<integer>]|[continual=<integer>]
#
# Where <processtype> has one of the following syntaxes:
#
# ENGINE - An FME Engine process
# SYSTEM - A FME System process
#
# Where <procesname> is the unique name of the process.
#
# Here is an example START command:
#
# START_ENGINE_Engine1=/FMEFlow/Server/fme/fme.exe REGISTER_FME_ENGINE JIM 7070
#
# When the Process Monitor encounters this parameter, it starts a new FME Engine process, runs the
# command string in the process and monitors the process for termination.
# If/when the process terminates, the Process Monitor creates another process and re-runs the same command
# string again. The Process Monitor continues this behaviour until it reaches its restart attempt limit.
#
# Optional START Parameters:
#
# "-ENGINE_HOST_NAME" specifies the host name the Engine is started on. This is used to group Engines for distributed systems.
# On single Engine host environments, this can be "localhost" otherwise it should be the Engine host name.
#
#
# STOP
#
# Each process START command can have an optional STOP parameter defining a
# custom stop command which will be run to shut down the process.
# For example:
#
# START_SYSTEM_Core=...
# STOP_SYSTEM_Core=...
#
# PARAMS
#
# Each process START command can also have an optional parameters. Parameters are delimited by |.
# For example:
#
# PARAMS_SYSTEM_Core=log=true|attempts=20|wait=0|continual=60
#
# Optional Parameters:
#
# "log"
#
# If "true" the process output generated by the command will be logged to the message log file. If "false",
# its process output is not logged to the log file. If missing, SYSTEM processes will default to "false"
# while ENGINE processes will default to "true".
#
# When process output is logged, each output line will be prefixed by the command's <processname> string.
# This helps to identify which process command generated each output line.
#
#
# For example the following would explicitly enable process output logging for this ENGINE configuration
# and the resulting outlines from this process would be prefixed by "Engine1":
#
# START_ENGINE_Engine1=/FMEFlow/Server/fme/fme.exe REGISTER_FME_ENGINE JIM 7070
# PARAMS_ENGINE_Engine1=log=true
#
# "norestart"
#
# The status value returned to the Process Monitor by the monitored process when the latter
# terminates. If a start command string specifies a value for this parameter, then
# if the monitored process terminates and returns the specified status value to
# the Process Monitor, the latter WILL NOT restart the terminated process. If
# this parameter is absent, or it is present but the terminating process
# returns a status value different from the specified value, the Process Monitor
# WILL restart the terminated process. If this parameter value is present but specifies an
# invalid integer value, the Process Monitor ignores any return values from the process.
#
# "attempts"
#
# The number of times the Process Monitor will attempt to start the process to be monitored. If the maximum
# value is reached the Process Monitor will give up attempting to start the process. If this flag
# is absent or is present and specifies a value <= 0, the process will have no limit to the number of
# times it is restarted. If this suffix flag is present and specifies an invalid integer value then
# the default start attempt limit value of 20 is used.
#
# Here is an example start command line using the "norestart" parameter (specifying a return status value of 27),
# the "log" parameter and the "attempts" parameter described above:
#
# START_ENGINE_Engine1=/FMEFlow/Server/fme/fme REGISTER_FME_ENGINE JIM 7070
# PARAMS_ENGINE_Engine1=log=true|norestart=27|attempts=20
#
# "continual"
#
# The number of seconds the Process Monitor will wait before attempting to start the process to be monitored.
# If this suffix flag is present and specified a value >= 0, the process will be restarted continually with
# a delay of <n> seconds between restart attempts. If this suffix flag is absent or is present and specifies
# a value <= -1, the process will not be continually restarted. Note: The delay to <n> seconds will start at
# 1 second and increase 1 second with each delay till it reaches a delay of <n> seconds upon which it will
# continue to have a delay of <n> seconds.
#
# "wait"
#
# For each process the Process Monitor interprets the wait period specified by
# the "wait" parameter in one of two ways:
#
# 1) Monitor Port Directive is Present
#
# If the -MONITOR_PORT directive is present in the process START command line,
# the wait period represents the maximum number of seconds the Process Monitor
# will wait for the monitored process to signal (via the monitor port) that it has
# successfully started.
#
# If the signal is received before the wait period expires, the Process Monitor
# immediately proceeds to start the next process.
#
# If the signal has not been received by the time the wait period expires, the
# Process Monitor stops waiting at that point and proceeds to start the next
# process.
#
# If the process fails to start after reaching its startup attempt limit
# (as specified by the "attempts" suffix flag), the Process Monitor
# immediately proceeds to start the next process, even if the wait period
# has not yet expired.
#
# To cause the Process Monitor to wait indefinitely for the start signal, specify
# a WAIT value of zero.
#
#
# 2) Monitor Port Directive is Absent
#
# If the -MONITOR_PORT directive is absent from the process START command line,
# the wait period represents the number of seconds the Process Monitor waits before
# continuing on to start the next process.
#
# If the process fails to start after reaching its startup attempt limit
# (as specified by the "attempts" suffix flag), the Process Monitor
# immediately proceeds to start the next process, even if the wait period
# has not yet expired.
#
# Specifying a waut value of zero causes the Process Monitor to immediately start
# the next process without waiting.
#
#
# In both of the above cases 1) and 2), if no "wait" parameter is specified for a
# process, the Process Monitor uses the default time value (in seconds) of zero.
#
# Processes that support the optional "MONITOR_PORT" directive" can include the
# following in their START command:
#
# -MONITOR_PORT <portNum>
#
# This directive specifies the TCP/IP port on which the Process Monitor listens for a
# startup completed message from the process. Upon successful startup completion the process
# should connect to this port and send the message string "STARTED". No further communication occurs.
#
# If the directive specifies a <portNum> value of zero then a free port number is dynamically
# determined by the Process Monitor at runtime. This is the usual case. If the <portNum> value is specified as
# non-zero and positive then that literal port number is used.
#
# If the process does not implement the monitor port capability then the
# directive should be omitted from the command string.
#
#--------------------------------------------------------------------------
################ WARNING ###############
# It is strongly advised not to make any
# changes to these configurations, as unexpected results may occur.
# Any changes to these configurations should occur only as directed in
# documentation that originates from Safe Software, or from Safe technical
# support. Any changes made to this file do not take effect unless
# NODE_OVERWRITE is set to TRUE.
################ WARNING ###############
FME_INCLUDE_FILE={{getv "/installdir"}}/Server/fmeCommonConfig.txt
#--------------------------------------------------------------------------
# Log File
#--------------------------------------------------------------------------
LOG_CONFIG_PATH={{getv "/installdir"}}/Server/config/logger/engine
LOG_FILE_NAME={{getv "/logprefix" ""}}fmeprocessmonitorengine.log
#--------------------------------------------------------------------------
# Admin
#--------------------------------------------------------------------------
NODE_ADMIN_PORT={{getv "/processmonitoradminportengine" "7500"}}
NODE_MANAGED={{getv "/nodemanaged" "true"}}
# ENGINE process configuration template
TEMPLATE_START_ENGINE="{{getv "/fmeexec"}}" REGISTER_FME_ENGINE {{getv "/corehostname" "localhost"}} {{getv "/serviceregistrationport" "7070"}} {{getv "/securitycluster" "DEFAULT"}} "{{getv "/installdir"}}/Server/fmeEngineConfig.txt" -ENGINE_HOST_NAME {{getv "/nodename"}} {{getv "/engineproperties" ""}}
TEMPLATE_STOP_ENGINE=
TEMPLATE_PARAMS_ENGINE=log=true|attempts=20|continual=60|wait=0|norestart=2
PROCESS_DESTROY_MODE={{ if eq (getenv "OS") "Windows_NT" }}DEFAULT{{ else }}STRONGEST_FIRST{{ end }}
{{if ne (getv "/remoteengine") "true" }}# Start FME Engine 1
START_ENGINE_{{getv "/nodename"}}_Engine1=!TEMPLATE_START_ENGINE! -ENGINE_TYPE {{getv "/enginetype" "STANDARD"}}
{{end}}
{{if ne (getv "/remoteengine") "true" }}# Start FME Engine 2
START_ENGINE_{{getv "/nodename"}}_Engine2=!TEMPLATE_START_ENGINE! -ENGINE_TYPE {{getv "/enginetype" "STANDARD"}}
{{end}}