Hitachi

JP1 Version 12 JP1/Performance Management Reference


jpcprocdef create

Organization of this page

Format

jpcprocdef create     -agent service-ID
                      -f input-file-name
                      [-removeOthers]
                      [-noquery]

Function

The jpcprocdef create command is used to set new application definitions for the specified agent. This command is also used to edit the existing application definitions of the specified agent. The definitions to be applied to the agent are provided by an XML file specified as the application definition file on the command line. Because the file can contain multiple application definitions, these definitions can be applied all at once by specifying the file.

Hosts that can execute the command

PFM - Web Console

Execution permission

In Windows:

User with Administrators permissions

In UNIX:

User with root user permissions

Before you can execute this command, you must create an authentication key file as a user account with the administrator user permission for Performance Management#. For details, see jpcmkkey.

#

Any Performance Management users or JP1 users who want to operate Performance Management must have this permission level.

Installation directory

In Windows:

installation-folder\tools\

In UNIX:

/opt/jp1pcwebcon/tools/

Arguments

-agent service-ID

Specifies the service ID of the Agent Collector service or a remote agent to identify the agent for which application definitions will be set. Wildcard characters cannot be used.

The service ID to be specified differs depending on the monitoring agent being used, as shown in the following table.

Monitoring agent being used

Service ID to be specified

PFM - Agent for Platform (Windows)

Service ID of the Agent Collector service

PFM - Agent for Platform (UNIX)

PFM - RM for Platform

Service ID of the remote agent

The following service IDs cannot be specified:

  • Service ID of the Agent Store service, Remote Monitor Collector service, Remote Monitor Store service, or a group agent

  • Service ID of a product that is not PFM - Agent for Platform or PFM - RM for Platform

-f input-file-name

Specifies the name of the application definition file. You can specify an absolute path or relative path.

-removeOthers

Specifies whether to delete any definitions with names that are not specified in the application definition files.

The following describes the command behavior when this option is specified and when it is not specified.

  • When this option is specified:

    All application definitions on the target agent are updated with the definitions specified in the application definition file. If there are application definitions whose names are not specified in the file, the command asks the user whether to delete the definitions.

  • When this option is not specified:

    Only the application definitions specified in the application definition file are added or updated.

-noquery

If this option is specified, the command does not output any query messages that interrupt command execution, making it unnecessary for the user to respond. Specify this option if you want the command to run in non-interactive mode.

The command behavior changes in various situations, as described below:

  • If application definitions with the same names as application definitions specified in the application definition file already exist on the target agent:

    The existing application definitions will be updated with the corresponding application definitions in the application definition file.

  • If the -removeOthers option is specified:

    Application definitions with names that are not specified in the application definition file will be deleted.

Format of the application definition file

XML tag specifications

  • application-definition

    Item

    Description

    Description

    The root tag for the settings in one application definition

    Specifiable value

    None

    Omissible

    No

    Attribute

    None

    Parent element

    pr-cli-parameters

    Child element

    name (One application-definition element must have only one name child element. This child element cannot be omitted.)

    virtual-env-id (One application-definition element can have only one virtual-env-id child element. This child element can be omitted.)

    process01, process02, ..., process15 (One application-definition element must have these 15 child elements. These child elements cannot be omitted.)

  • name

    Item

    Description

    Description

    The name of an application definition

    Specifiable value

    For details about the character string that can be specified, see the section that describes active and inactive state information for processes in one of the following manuals: (1) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for Windows systems), (2) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for UNIX systems), (3) JP1/Performance Management - Remote Monitor for Platform Description, User's Guide and Reference

    Note that although you can use spaces or line brakes within an element, you must not include unintended spaces or line breaks between the start and end tags of an element.

    Omissible

    No

    Attribute

    None

    Parent element

    application-definition

    Child element

    None

  • virtual-env-id

    Item

    Description

    Description

    The virtual environment ID

    Note:

    If the version of PFM - Web Console is earlier than 11-50 and the target agent is PFM - Agent for Platform (Windows), the value of this element is ignored.

    For PFM - Web Console version 11-50 or later, this setting is ignored if the target agents are running in a virtual environment that does not support the specification of IDs.

    Specifiable value

    For details about the character string that can be specified, see the section that describes active and inactive state information for processes in one of the following manuals: (1) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for Windows systems), (2) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for UNIX systems), (3) JP1/Performance Management - Remote Monitor for Platform Description, User's Guide and Reference

    Note that although you can use spaces or line brakes within an element, you must not include unintended spaces or line breaks between the start and end tags of an element.

    Omissible

    Yes (If this element is omitted, the command assumes that a blank is specified.)

    Attribute

    None

    Parent element

    application-definition

    Child element

    None

  • process01, process02, ..., process15

    Item

    Description

    Description

    The elements that specify the processes that make up an application definition (each element specifies one process).

    The processXX elements correspond to the MonitoringXX properties of the agent.

    Specifiable value

    The run-time name of a program, command, or service to be monitored (value of MonitoringXX Condition).

    For details about the character string that can be specified, see the section that describes active and inactive state information for processes in one of the following manuals: (1) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for Windows systems), (2) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for UNIX systems), (3) JP1/Performance Management - Remote Monitor for Platform Description, User's Guide and Reference

    Note that although you can use spaces or line brakes within an element, you must not include unintended spaces or line breaks between the start and end tags of an element.

    Omissible

    No

    Attribute

    label

    Specifies the label of a monitoring condition. (The value to be specified for a MonitoringXX Label property of the agent. This attribute is required.)

    For details about the character string that can be specified, see the section that describes active and inactive state information for processes in one of the following manuals: (1) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for Windows systems), (2) JP1/Performance Management - Agent Option for Platform Description, User's Guide and Reference (for UNIX systems), (3) JP1/Performance Management - Remote Monitor for Platform Description, User's Guide and Reference

    Note that although you can use spaces or line brakes within an element, you must not include unintended spaces or line breaks between the start and end tags of an element.

    type

    Specifies the field to be monitored. (The value specified for a MonitoringXX Field property of the agent. This attribute is required.)

    One of the following eight values can be specified:

    • none or NONE: Nothing is selected.

    • program or PROGRAM: Program

    • commandline or COMMANDLINE: Command line

    • service or SERVICE#: Service

    min

    Specifies the minimum number of monitoring targets. (The value specified on the left of the hyphen (-) for a MonitoringXX Range property of the agent. This attribute is required.)

    An integer from 0 through 65,535 can be specified. Note that the min value must not be greater than the max value.

    max

    Specifies the maximum number of monitoring targets. (The value specified on the right of the hyphen (-) for a MonitoringXX Range property of the agent. This attribute is required.)

    An integer from 0 through 65,535 can be specified. Note that the min value must not be greater than the max value.

    Parent element

    application-definition

    Child element

    None

    #

    If the target agent is PFM - Agent for Platform (UNIX), service or SERVICE cannot be specified. If service or SERVICE is specified in this case, the command assumes that none is specified.

Examples of specifying settings in the application definition file are shown below. In addition to these examples, a sample application definition file is provided. This sample file might be useful when you create your application definition file. The location of the sample file is as follows.

In Windows:

installation-folder\sample\processmonitoringcommand\

In UNIX:

/opt/jp1pcwebcon/sample/processmonitoringcommand/

Example of specifying settings in the application definition file (when defining one application for Windows monitoring-target hosts):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE pr-cli-parameters SYSTEM "processmonitoring_params.dtd">
<pr-cli-parameters ver="0100">
<application-definition>
<name>PFM - Agent</name>
<virtual-env-id></virtual-env-id>
<process01 label="Health Check" type="program" max="1" min="0">jpcagt0*</process01>
<process02 label="How many agents" type="commandline" max="65535" min="1">*\jp1pc\agt*\agent\jpcagt*</process02>
<process03 label="RM service" type="service" max="1" min="0">JP1PCAGT_7A_*</process03>
<process04 label="Monitoring04" type="none" max="0" min="0"></process04>
<process05 label="Monitoring05" type="none" max="0" min="0"></process05>
<process06 label="Monitoring06" type="none" max="0" min="0"></process06>
<process07 label="Monitoring07" type="none" max="0" min="0"></process07>
<process08 label="Monitoring08" type="none" max="0" min="0"></process08>
<process09 label="Monitoring09" type="none" max="0" min="0"></process09>
<process10 label="Monitoring10" type="none" max="0" min="0"></process10>
<process11 label="Monitoring11" type="none" max="0" min="0"></process11>
<process12 label="Monitoring12" type="none" max="0" min="0"></process12>
<process13 label="Monitoring13" type="none" max="0" min="0"></process13>
<process14 label="Monitoring14" type="none" max="0" min="0"></process14>
<process15 label="Monitoring15" type="none" max="0" min="0"></process15>
</application-definition>
</pr-cli-parameters>

Example of specifying settings in the application definition file (when defining one application that monitors processes that run in a specific virtual environment for UNIX monitoring-target hosts):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE pr-cli-parameters SYSTEM "processmonitoring_params.dtd">
<pr-cli-parameters ver="0100">
<application-definition>
<name>PFM - Agent</name>
<virtual-env-id>1</virtual-env-id>
<process01 label="Health Check" type="program" max="1" min="0">jpcagt0*</process01>
<process02 label="How many agents" type="commandline" max="65535" min="1">jpc*/jp1pc/agt*/agent*</process02>
<process03 label="Monitoring03" type="none" max="0" min="0"></process03>
<process04 label="Monitoring04" type="none" max="0" min="0"></process04>
<process05 label="Monitoring05" type="none" max="0" min="0"></process05>
<process06 label="Monitoring06" type="none" max="0" min="0"></process06>
<process07 label="Monitoring07" type="none" max="0" min="0"></process07>
<process08 label="Monitoring08" type="none" max="0" min="0"></process08>
<process09 label="Monitoring09" type="none" max="0" min="0"></process09>
<process10 label="Monitoring10" type="none" max="0" min="0"></process10>
<process11 label="Monitoring11" type="none" max="0" min="0"></process11>
<process12 label="Monitoring12" type="none" max="0" min="0"></process12>
<process13 label="Monitoring13" type="none" max="0" min="0"></process13>
<process14 label="Monitoring14" type="none" max="0" min="0"></process14>
<process15 label="Monitoring15" type="none" max="0" min="0"></process15>
</application-definition>
</pr-cli-parameters>

Example of specifying settings in the application definition file (when defining two applications that monitor PFM - Manager and PFM - Web Console processes for Windows monitoring-target hosts):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pr-cli-parameters SYSTEM "processmonitoring_params.dtd">
<pr-cli-parameters ver="0100">
<application-definition>
<name>PFM - Manager</name>
<virtual-env-id></virtual-env-id>
<process01 label="jpcah" max="65535" min="1" type="program">jpcah.exe</process01>
<process02 label="jpcagt0" max="65535" min="1" type="program">jpcagt0.exe</process02>
<process03 label="jpcep" max="65535" min="1" type="program">jpcep.exe</process03>
<process04 label="jpcmm" max="65535" min="1" type="program">jpcmm.exe</process04>
<process05 label="jpcnsvr" max="65535" min="1" type="program">jpcnsvr.exe</process05>
<process06 label="jpcstatsvr" max="65535" min="1" type="program">jpcstatsvr.exe</process06>
<process07 label="jpcsto" max="65535" min="2" type="program">jpcsto.exe</process07>
<process08 label="jpctrap" max="65535" min="1" type="program">jpctrap.exe</process08>
<process09 label="jpcvsvr" max="65535" min="1" type="program">jpcvsvr.exe</process09>
<process10 label="Monitoring10" max="0" min="0" type="none"></process10>
<process11 label="Monitoring11" max="0" min="0" type="none"></process11>
<process12 label="Monitoring12" max="0" min="0" type="none"></process12>
<process13 label="Monitoring13" max="0" min="0" type="none"></process13>
<process14 label="Monitoring14" max="0" min="0" type="none"></process14>
<process15 label="Monitoring15" max="0" min="0" type="none"></process15>
</application-definition>
<application-definition>
<name>PFM - Web Console</name>
<virtual-env-id></virtual-env-id>
<process01 label="jpcwebcon" max="65535" min="1" type="program">jpcwebcon.exe</process01>
<process02 label="cjstartsv" max="65535" min="1" type="program">cjstartsv.exe</process02>
<process03 label="cprfd" max="65535" min="1" type="program">cprfd.exe</process03>
<process04 label="httpsd" max="65535" min="2" type="program">httpsd.exe</process04>
<process05 label="rotatelogs2" max="65535" min="4" type="program">rotatelogs2.exe</process05>
<process06 label="Monitoring06" max="0" min="0" type="none"></process06>
<process07 label="Monitoring07" max="0" min="0" type="none"></process07>
<process08 label="Monitoring08" max="0" min="0" type="none"></process08>
<process09 label="Monitoring09" max="0" min="0" type="none"></process09>
<process10 label="Monitoring10" max="0" min="0" type="none"></process10>
<process11 label="Monitoring11" max="0" min="0" type="none"></process11>
<process12 label="Monitoring12" max="0" min="0" type="none"></process12>
<process13 label="Monitoring13" max="0" min="0" type="none"></process13>
<process14 label="Monitoring14" max="0" min="0" type="none"></process14>
<process15 label="Monitoring15" max="0" min="0" type="none"></process15>
</application-definition>
</pr-cli-parameters>

Notes

Return values

0

The command terminated normally.

1

The command line format is invalid.

2

The user does not have execution permission for the command.

4

There are invalid command arguments.

5

The input XML file is formatted incorrectly.

10

The definitions in the input file are invalid.

11

Authentication by PFM - Manager failed. Alternatively, the user that was specified when the authentication key file was created by using the jpcmkkey command does not have permission to execute the command.

80

When the command was executed without the -noquery option and the user was asked whether to continue processing, the processing was interrupted because the user made a reply that was not Y or y.

100

The Performance Management environment is invalid.

141

The number of application definitions exceeds 64.

144

Command execution failed.

As a result, the application definitions in the input file were applied incompletely.

200

A memory shortage occurred.

202

The input file cannot be accessed.

222

An error occurred during communication processing.

224

Connection to the agent is impossible.

225

The agent does not exist.

226

The agent is not supported.

227

The PFM - Manager host for the connection destination is not supported.

228

The target agent is not set up on the PFM - Manager host for the connection destination.

255

An unexpected error occurred.

Usage example 1

The following example applies the definitions that are specified in the application definition file appdef.xml to the agent TA1hostpfm.

jpcprocdef create -agent TA1hostpfm -f appdef.xml

Usage example 2

The following example overwrites the application definitions that exist on the agent TA1hostpfm with the definitions that are specified in the application definition file appdef.xml, deleting all existing definitions that are not specified in the file.

jpcprocdef create -agent TA1hostpfm -f appdef.xml -removeOthers -noquery

Output example

When this command is executed, detailed information about the command processing is output to the standard output, standard error output, and operation status log file. For the logging specifications, see Chapter 6. Log Information Output by Performance Management.

An example of information that is output to the standard output when the processing in Usage example 2 above succeeds is shown below. In this example, OK has been output as the command execution result for the agent specified by a service ID (if the processing fails, ERR is output).

Example of standard output

jpcprocdef create connected to localhost at yyyy MM dd HH:MM:SS.mmm
KAVJK6518-I Multiple application definitions to be overwritten exist.
KAVJK6521-I Multiple application definitions to be deleted exist.
KAVJK6504-I Processing to update application definitions will now continue.
create result OK : TA1hostpfm
jpcprocdef create disconnected at yyyy MM dd HH:MM:SS.mmm