4.13 ExecUtil

Use this Knowledge Script to run non-interactive programs from the command line interface on the agent computer and report output of the program. You can use this script to report events based on the output of the program, and you can also use this script to retrieve numeric data points from the program output so you can create charts and graphs of that data.

This script also allows you to run the program in trial mode so you can ensure the parameters are set the way you want before you schedule jobs. If you run the script in trial mode, AppManager generates an event that provide useful information, such as the output of the script or command, in the event details. Trial mode reports the output of the program, but does not evaluate the output. In trial mode, you can verify that you have properly set parameters for the command, the command arguments, environment settings, and data collection without generating extraneous events.

This script does not support running interactive scripts, such as scripts using the \cat command, and does not support incoming data streams during data extraction, for example, STDIN, Terminal, or TTY.

In order for AppManager to properly interpret the output from your script or executable, the output must be in UNIX plain text.

4.13.1 Resource Object

UNIX computer icon

4.13.2 Default Schedule

The default interval for this script is Run Once.

4.13.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

General Settings

UNIX executable or script name

Specify the command or script name to run on the UNIX or Linux command line. This is the command or script that AppManager will execute on the operating system, not a descriptive name.

Executable or script arguments

Specify the arguments for the command in the format that the command requires.

Application name

Required field. Specify the name you want AppManager to use to identify the program that runs on the UNIX or Linux command line.

Modify environment variable settings?

Select Yes to temporarily add, change a value for, or ignore environment variables when the command or script runs. The default is unselected.

Environment variables to set (comma separated,Eg. VAR1=VAL1,VAR2=VAL2)

Specify the new environment variables you want to set or the existing environment variables you want to override during the execution of the command or script. Separate the variables with a comma, but no spaces. AppManager does not permanently change the variables that you list in this parameter.

Environment variables to unset (comma separated,Eg. VAR1,VAR2)

Specify the environment variables to ignore during the execution of the command or script. Separate the variables with a comma, but no spaces. AppManager does not permanently remove the variables that you list in this parameter.

Inherit environmental settings for data extraction command?

Select Yes if you want AppManager to use the same environment variable parameter settings to retrieve data from the output of the program as AppManager used to run the program. The default is unselected.

Trial mode? (reports output without validating)

Select Yes if you want AppManager to run the program and report the output of the program, but not compare the output to the criteria you have set for events. Use this parameter to ensure that you have properly configured the parameters in this Knowledge Script to generate the events and data that you want. The default is Yes.

Event Settings

Raise event with the standard output?

Select Yes if you want AppManager to report an event if the program generates any output. The details of the event contain the output of the program. When you run in Trial Mode, this parameter is ignored. The default is unselected.

Event severity

Specify the event severity level, from 1 through 40, to indicate the importance of the event generated for standard output. The default is 25.

Raise event if execution generates no output?

Select Yes to raise an event if the program does not generate any results. This parameter will create an event if the program fails to execute. When you run in Trial Mode, this parameter is ignored. The default is Yes.

Event severity

Specify the event severity level, from 1 through 40, to indicate the importance of the event generated if the program does not create output. The default is 5.

Raise event if output contains specific strings?

Select Yes to raise an event if the program generates output that matches a specified character string. Specify the criteria using the String list parameter. If you enter multiple character strings, a separate event is raised for each string that matches the output. When you run in Trial Mode, this parameter is ignored. The default is unselected.

String list (comma-separated)

Specify one or more set of UNIX plain text characters to compare to the output of the program. Do not use special characters or rich text. Separate the strings with commas and no spaces. For example, Incomplete,Data out of bounds,7,error9

Match case?

Select Yes if you want to distinguish between uppercase and lowercase. The default is unselected.

Event severity

Specify the event severity level, from 1 through 40, to indicate the importance of the event generated when the output matches a specified character string. The default is 5.

Raise event if output doesn't contain specific strings?

Select Yes if you want to raise an event if the program generates output that does not include a specified character string. Specify the criteria using the String list parameter. If you enter multiple character strings, a separate event is raised for each string that is not included in the output. When you run in Trial Mode, this parameter is ignored. The default is unselected.

String list (comma separated)

Select Yes to specify one or more sets of characters to compare to the output of the program. Separate the strings with commas and no spaces. For example, No data available,Data written to file,InfoMessage2

Match case?

Select Yes to specify whether you want to distinguish between uppercase and lowercase. The default is unselected.

Event severity

Specify the event severity level, from 1 through 40, to indicate the importance of the event generated when the output does not include a specified character string. The default is 5.

Raise event if extracted numeric data exceed thresholds?

Select Yes to raise an event if data over a specified threshold is extracted from the program using the Data Collection parameters. Specify the numeric threshold using the Thresholds for extracted data parameter. When you run in Trial Mode, this parameter is ignored. The default is unselected.

Event severity

Specify the event severity level, from 1 through 40, to indicate the importance of the event generated when the data extracted exceeds the threshold. The default is 5.

Event severity for internal failure

Specify the event severity level, from 1 though 40, to indicate the importance of an event generated for internal failures. The default is 5.

Data Collection

Collect numeric data?

Select Yes if you want AppManager to extract numeric data from the program output that can be used to create charts and graphs or generate events if the number is greater than or less than specified thresholds. You can extract more than one number to use for graphing or to generate events, but the data must be numeric so AppManager can perform the necessary calculations. You can extract negative numbers and decimals, but not numbers that are in scientific notation. The default is unselected.

Data extraction method? (awk/perl/custom)

Specify how you want AppManager to get numeric data from the output generated by the command or application you specified in the General Settings parameters. If you use awk command or perl command, ensure that the account running the agent can access the utilities. The default is custom command.

Data extraction arguments or expression

Specify the command or expression to extract the numeric data from the program output.

Labels to use for extracted data (comma separated)

Specify the name for AppManager to use to identify the extracted numeric data. If you have multiple numbers, separate the labels for each with a comma and no spaces.

Thresholds for extracted data (comma separated,Eg. MAX1:MIN1,MAX2:MIN2)

Type a set of maximum and minimum thresholds for the extracted data. Separate the maximum and minimum with a colon and no spaces. For example, if you want AppManager to generate an event when the numeric data goes above 75 or below 50, enter 75:50. If you have multiple numbers, separate the thresholds for each number with a comma and no spaces. For example, 75:50,8600:-2486.

Enable debugging? (y/n)

Select Yes to enable debugging. The default is unselected.