6.3.2 Monitoring app definition file
If you want to monitor one or more processes, use the monitoring app definition file to define the applications, processes, child processes, and services to be monitored.
- Organization of this subsection
(1) Format
In a monitoring app definition file, you can define multiple applications to be monitored. The definition for an application to be monitored consists of multiple definitions. These definitions include the definition of the application and the definitions of one or more processes or services (included in the application). Definitions of child processes might also exist (included in the processes). The format of a monitoring app definition file is as follows:
(2) Details of monitored application definition
Define the applications to be monitored by APM. You must write a monitored application definition for each application to be monitored.
The next table lists the items that constitute a monitored application definition.
Key name |
Value |
---|---|
apname ((character string of up to 128 bytes)) |
Specify the name of the application to be monitored. You cannot specify a semicolon (;), comma (,), tab, and multibyte code. |
apinfo ((character string of up to 128 bytes)) |
Specify additional information for the application to be monitored. You cannot specify a semicolon (;), tab, and multibyte code. |
apcommand ((character string of up to 160 bytes)) |
Specify the application start or stop remote command. You can specify the application start or stop remote command more than once. To specify multiple commands, write the key name apcommand for each command to be executed on multiple lines as follows: Example: apcommand=cmd /q /c C:\abc.bat apcommand=cmd /q /c C:\def.bat apcommand=cmd /q /c C:\ghi.bat |
psnumber ((integer of 1 or above)) |
Specify the number of processes to be registered in the application. |
svcnumber ((integer of 1 or above)) |
Specify the number of services to be registered in the application. |
When coding a monitored application definition, note the following:
-
When you omit an optional definition item, you can only omit the value; you must write the key name and an equal sign (=).
-
If a single definition file contains more than one definition with the same value of apname, only the first application definition will be regarded as valid and the other application definitions will be ignored.
-
If two or more identical values are assigned to an item that accepts multiple specifications, only the first specification will be regarded as valid and the other specifications will be ignored.
-
You cannot specify psnumber and svcnumber together under a single apname key.
-
For remote commands, see 2.5.2(4) Automated actions and remote commands.
(3) Details of definitions of processes to be monitored
Define the processes to be monitored by APM. You must write the same number of process definitions as the value assigned to psnumber in the monitored application definition.
The next table lists the items that constitute a monitored process definition. For information on process types, see 2.5 Process and service monitoring function.
Key name |
Value |
---|---|
psname ((C or E;character string of up to 60 bytes)) |
Specify semicolon-separated pair consisting of the type and name of the process to be monitored. If the process type is a command line name, specify C. If it is an executable file name, specify E. If the monitoring server runs on Windows, exclude the extension .exe from the process name. You can use an asterisk (*) or question mark (?) as a wild card. |
pscommand ((character string of up to 160 bytes)) |
Specify the process start or stop remote command. You can specify the process start or stop remote command more than once. To specify multiple commands, write the key name pscommand for each command to be executed on multiple lines as follows: Example: pscommand=cmd /q /c C:\abc.bat pscommand=cmd /q /c C:\def.bat pscommand=cmd /q /c C:\ghi.bat |
psthreshold <<1;1>> ((0 to 9999)) |
Specify a semicolon-separated pair consisting of the upper and lower limits of the threshold (the number of processes to be started at the same time). The upper limit must be equal to or greater than the lower limit. |
cpsnumber ((integer of 0 or above)) |
Specify the number of child processes to be registered in the process. If you specify 0, you need not define the child processes to be monitored. |
When coding a monitored process definition, note the following:
-
When you omit an optional definition item, you can only omit the value; you must write the key name and an equal sign (=).
-
If two or more identical values are assigned to an item that accepts multiple specifications, only the first specification will be regarded as valid and the other specifications will be ignored.
-
If a single definition file contains more than one definition with the same value of psname, only the first process definition will be regarded as valid and the other process definitions will be ignored.
-
For remote commands, see 2.5.2(4) Automated actions and remote commands.
(4) Details of definitions of child processes to be monitored
Define the child processes to be monitored by APM. You must define the same number of child process definitions as the value assigned to cpsnumber in the monitored process definition.
The next table lists the items that constitute a monitored child process definition. For information on child process types, see 2.5 Process and service monitoring function.
Key name |
Value |
---|---|
cpsname ((character string of up to 60 bytes)) |
Specify a semicolon-separated pair consisting of the type and name of the child process to be monitored. If the child process type is a command line name, specify C. If it is an executable file name, specify E. If the monitoring server runs on Windows, exclude the extension .exe from the process name. You can use an asterisk (*) or question mark (?) as a wild card. |
cpscommand ((character string of up to 160 bytes)) |
Specify the child process start or stop remote command. You can specify the child process start or stop remote command more than once. To specify multiple commands, write the key name cpscommand for each command to be executed on multiple lines as follows: Example: cpscommand=cmd /q /c C:\abc.bat cpscommand=cmd /q /c C:\def.bat cpscommand=cmd /q /c C:\ghi.bat |
cpsthreshold <<1;1>> ((0 to 9999)) |
Specify a semicolon-separated pair consisting of the upper and lower limits of the threshold (the number of child processes which are to be started at the same time). The upper limit must equal to or greater than the lower limit. |
When coding a monitored child process definition, note the following:
-
When you omit an optional definition item, you can only omit the value; you must write the key name and an equal sign (=).
-
If a single definition file contains more than one definition with the same value of cpsname, specification will be regarded as valid and the other specifications will be ignored.
-
If one monitored process definition contains two or more child process definitions that have the same value assigned to the key name cpsname, only the first child process definition will be regarded as valid and the other child process definitions will be ignored.
-
For remote commands, see 2.5.2(4) Automated actions and remote commands.
(5) Details of definitions of services to be monitored
Define the services to be monitored by APM. You must write the same number of service definitions as the value assigned to svcnumber in the monitoring application definition. The next table lists the items that constitute a monitored service definition.
Key name |
Value |
---|---|
svcname ((character string of up to 100 bytes)) |
Specify a service name. You cannot use a semicolon (;) in the service name. An asterisk (*) or question mark (?) specified in a service name is not treated as a wild card but treated as a normal character. You cannot monitor services by using their service display names. |
svccommand ((character string of up to 160 bytes)) |
Specify the service start or stop remote command. You can specify the child service start or stop remote command more than once. To specify multiple commands, write the key name svccommand for each command to be executed on multiple lines as follows: Example: svccommand=net start xxxxx svccommand=net stop yyyyy svccommand=cmd /q /c C:\abc.bat |
svcstatusmap |
Specify each state of the service to be monitored as normal or critical state. Write the key name, and specify normal or critical for service states, such as Running, Stopped, Paused, Starting, Stopping, Pausing, and Resuming, in this order. Delimit the states with a semicolon (;). Specify N for a state to be treated as a normal state or C for a state to be treated as a critical state. |
When coding a monitored service definition, note the following:
-
When you omit an optional definition item, you can only omit the value; you must write the key name and an equal sign (=).
-
If two or more identical values are assigned to an item that accepts multiple specifications, only the first specification will be regarded as valid and the other specifications will be ignored.
-
If the definition for an application to be monitored includes multiple svcname key values defined for the same service to be monitored, the svcname value defined first is assumed to be valid. The other svcname values are assumed to be invalid.
-
For remote commands, see 2.5.2(4) Automated actions and remote commands.
(6) Example
An example of a monitoring app definition file is given below.