IBM Tivoli Netcool/OMNIbus Version 8.1

Defining processes in the process agent configuration file

Within the process agent configuration file, you must define the list of processes that should be run by the process agents.

Process definition example

An example process definition in the $NCHOME/omnibus/etc/nco_pa.conf configuration file is as follows:

nco_process 'ObjectServer'
{
Command '$NCHOME/omnibus/bin/nco_objserv -name NCOMS -pa SFOSYS1_PA' run as 0
Host			=		'sfosys1'
Managed			=		True
RestartMsg		=		'${NAME} running as ${EUID} has been restored on ${HOST}.'
AlertMsg		=		'${NAME} running as ${EUID} has died on ${HOST}.'
RetryCount		=		0
ProcessType		=		PaPA_AWARE
}

Process definition description

The following table uses the preceding example to describe the process definition information that is contained in the configuration file.

Table 1. Process definition description
Configuration information Description
nco_process 'ObjectServer' Defines the name of the process. This example is for an ObjectServer.
Note: Process names must be unique for this process agent. If you use the same process name more than once, all, except for the first process definition, are ignored, and a warning message is generated.
Command The command string that starts the process, as it would be entered on the command line. Use the full path for the command. For example, to configure an ObjectServer named NCOMS, enter:

'$NCHOME/omnibus/bin/nco_objserv -name NCOMS -pa SFOSYS1_PA' run as 0

Or enter:

'$NCHOME/omnibus/bin/nco_objserv -name NCOMS -pa SFOSYS1_PA' run as 'root'

In this example:
  • The -pa option specifies the process agent that the ObjectServer uses to run external automations. In this example, the process agent name is specified as SFOSYS1_PA.
  • The run as option instructs the host computer to run the ObjectServer as the specified user. On UNIX, you can either enter the user ID (typically 0), or enter the user name enclosed in single quotation marks (typically root). When a user name is entered, the process agent looks up the user ID to use. If the process agent is not running as root, the run as option is ignored, and the process is run as the user who is running the process agent.

    On Windows, all processes are run under the same user account as the process agent; always set the run as option to 0.

    Tip: On Windows, you can use %NCHOME%, $NCHOME, or the expanded form of the environment variable, in the path for the command. It is also acceptable to use slashes (/), backslashes (\), or double backslashes (\\) as separators.
You can set the following additional process attributes by adding them to the beginning of the command string:
  • CWD: Set the current working directory to the value specified.

    On Windows, you can specify the directory in any of these formats: MS-DOS format (for example, C:\temp), UNIX format (for example, /temp/mydir), and UNC format (for example, \\server\share\mydir). Both single and double backslashes can also be used as separators.

    When you run the process agent from the command line on UNIX and Windows, the working directory for all child processes is the directory from which the process agent was started. When you run the process agent as a UNIX daemon, the working directory for all child processes is $NCHOME/omnibus. When you run the process agent as a Windows service, the default working directory for the process agent and for any child processes that are spawned by the process agent is %NCHOME%\omnibus\log.

  • SETGID: Set the group ID of the process to the value specified. This is a UNIX-specific attribute.
  • UMASK: Set the umask of the process to the value specified. This is a UNIX-specific attribute.

The format for specifying each of these attributes is as follows:

Command '[CWD=directory_path]commandpath options' run as user

Command '[SETGID=groupID]commandpath options' run as user

Command '[UMASK=permission]commandpath options' run as user

Note: You must specify the attributes as shown, in square brackets, without spaces.

Examples (UNIX):

Command '[CWD=/opt/netcool/]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253

Command '[SETGID=ncoadmin]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253

Command '[UMASK=u=rwx,g=rx,o=rx]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253

Tip: In the preceding example with the UMASK setting, write permissions are assigned to the current user, but removed for all other users. You can alternatively specify this as [UMASK=022].

Command '[UMASK=077]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253

You can specify one or more of the attributes within the command string. For example:

Command '[CWD=/tmp][SETGID=ncoadmin][UMASK=u=rwx,g=,o=]$NCHOME/omnibus/bin/nco_objserv -name NCOMS2 -pa NCO_PA' run as 1253

Example (Windows):

Command '[CWD=C:\temp]%NCHOME%\omnibus\bin\nco_objserv -name NCOMS2 -pa NCO_PA' run as 0

Host The name of the host on which the process should be run. Process control automatically resolves the name of the process agent when required.
Managed Can have either of these values:
  • True: The process is restarted automatically if it exits.
  • False: The process is not monitored by the process agent or restarted automatically if it exits.

    The status of an unmanaged process might be reported incorrectly by nco_pa_status or nco_config. For example, the returned status might be DEAD when the process is running correctly. This is not an error and it happens because the process agent starts unmanaged processes but does not monitor them.

RestartMsg Contains the message to be sent to the UNIX syslog or the Windows Event Viewer if the process is restarted. For example, The ObjectServer has been restarted.
AlertMsg Contains the message to be sent to the UNIX syslog or the Windows Event Viewer if the process exits. For example, The ObjectServer has gone down.
RetryCount Specifies the number of restart attempts to be made if the process exits in the time specified by the nco_pad -retrytime command-line option. If set to 0, there is no limit to the number of restart attempts. The default is 0.
ProcessType Can have the value PaPA_AWARE for PA aware processes and PaNOT_PA_AWARE for processes that are not PA aware.

Expansion keywords

You can include expansion keywords in the RestartMsg and AlertMsg entries in the configuration file. Expansion keywords act as variables and contain information about the process that has restarted.

The expansion keywords are shown in the following table.

Table 2. Expansion keywords
Expansion keyword Description
${NAME} The name of the process.
${HOST} The name of the host running the process.
${EUID} The effective user ID under which the process is running.
${COMMAND} The command that defines the process.

Alert and restart syslog or Event Viewer messages

When an alert or restart message is generated by the process agent daemon nco_pad, it is passed to the UNIX syslog or the Windows Event Viewer. Tivoli Netcool/OMNIbus has a Syslog probe that can monitor these messages and convert them into ObjectServer alerts. For more information about the Syslog probe, refer to the probe documentation that is available on the Tivoli® Network Management Information Center at http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/index.jsp.

The alert and restart messages are sent to the UNIX syslog or the Windows Event Viewer as warnings. The message is formatted as:

HOSTNAME : ALERT_OR_RESTART_MSG : MSG

The HOSTNAME is the name of the host that has reported the problem. ALERT_OR_RESTORE_MSG describes the type of message. MSG is the text that is defined in the configuration file for that process.


Library | Support |