4.3 ApplicationProcessMonitor

Use this Knowledge Script to monitor the number of application processes for a particular application.

An application can include multiple application processes. Each application process in turn can have more than one process instance. If the total number of process instances for any of the application processes detected falls below the threshold count you set, AppManager raises an event.

The threshold parameter allows you to set a separate threshold for multiple monitored processes. First, supply a list of processes to monitor for the Process names parameter. Separate the process names in the list with commas and no spaces. Then supply a comma-separated list of threshold values that correspond to the processes and are listed in the same order.

You also have the option to restart any process that appears to be down. Anytime the number of process instances for a process reaches 0, this Knowledge Script can invoke a restart command that you supply (see the Command to restart processes when process count crosses minimum threshold parameter, below). You can enable events to notify you if the attempt to restart a process with a process count of 0 has succeeded or failed. These events are raised by the output term corresponding to success in your command script. You need to supply this output term for the Word(s) in restart command output that indicate success parameter.

If you enable data collection, this Knowledge Script returns the current process instance count for all the processes in the monitored application(s).

4.3.1 Resource Object

UNIX CPU folder

4.3.2 Default Schedule

The default interval for this script is Every 10 minutes.

4.3.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

Application to monitor

Supply the name of the application whose processes you want to monitor. The default is My Application.

Process Monitoring

Process names

Specify the names of processes to monitor, separate the names of multiple processes with commas and no spaces.

Threshold -- Minimum number of processes

Specify the minimum number of process instances that must be running for each monitored process to prevent an event from being raised.

Separate multiple threshold values with commas and no spaces. To ensure that the proper threshold is applied to the intended process, list thresholds in the same order as you listed processes for the Process names threshold.

Threshold -- Maximum number of processes

Specify the maximum number of process instances that must be running for each monitored process to prevent an event from being raised. If an application is running more than this number of process instances, an event is raised.

Separate multiple threshold values with commas and no spaces. To ensure that the proper threshold is applied to the intended process, list thresholds in the same order as you listed processes for the Process names threshold.

Command to restart processes when process count crosses minimum Threshold

Specify a command to use to restart any process whose process count is higher than the threshold. Separate multiple commands with commas and no spaces. Leave this parameter blank if you do not want to restart processes automatically.

Word(s) in restart command output that indicate success

Specify a list of the words to be returned by the scripts you supplied to indicate that the scripts succeeded in restarting a process. The presence of these words raises the success event in AppManager.

Use a vertical bar character (|) to separate multiple words, and use a comma to separate the word groups for each process. The default is:

started|success|succeed

Event Notification

Raise event if number of processes falls below threshold?

Select Yes to raise an event if the process instance count for any monitored process falls below a threshold you set. The default is Yes.

Event severity when number of processes falls below threshold

Set the event severity level, from 10 to 19, to indicate the importance of the event. The default is 10.

Event severity when attempt to restart process fails

Set the event severity level, from 1 to 9, to indicate the importance of the event. The default is 5.

Event severity when attempt to restart process succeeds

Specify the event severity level, from 20 to 40, to indicate the importance of the event. The values you enter for the Word(s) in restart command output that indicate success parameter raises this event. The default is 25.

Event severity for internal failure

Set the event severity level, from 1 to 40, to indicate the importance of an event in which this job experienced an internal error. The default is 5.

Data Collection

Collect data for number of processes?

Select Yes to collect data for charts and reports. If enabled, this script returns the number of process instances detected for each monitored process. The default is Yes.

Enable debugging?

Select Yes to enable debugging. The default is unselected.