Hitachi

JP1 Version 12 JP1/Performance Management Reference


jpctool alarm export

Organization of this page

Format

jpctool alarm export    -f target-file-name
                       {-key service-key
                       [-table alarm-table-name[-alarm alarm-name]]
                       [-only]|
                        -template}
                       [-y|-n]
                       [-wait number-of-seconds]

Function

The jpctool alarm export command exports alarm definitions to the specified file.

Alarm definition information is exported in accordance with the syntax of the alarm definition file. For details about the syntax of the alarm definition file, see the chapter in the JP1/Performance Management User's Guide that describes operation monitoring by alarms.

The following table shows the range of alarm definition information that is exported depending on the combination of the -key, -table, and -alarm options that is specified:

Table 3‒44: Range of alarm definition information that is exported depending on the combination of options that is specified

Option specifications

Information that is exported

-key

-table

-alarm

S

N

N

All alarm definition information for the alarm tables that are defined for the PFM - Agent or PFM - RM specified in the -key option is exported.

S

S

N

All alarm definition information in the alarm table that is specified in the -table option is exported.

S

S

S

Only the definition information for the alarm specified in the -alarm option is exported.

Legend:

S: Specified

N: Not specified

By specifying the -template option, you can output the template file that contains all the labels that are defined in the alarm definition file.

Hosts that can execute the command

PFM - Manager

Execution permission

In Windows:

User with Administrators permissions

In UNIX:

User with root user permissions

Installation directory

In Windows:
installation-folder\tools\
In UNIX:
/opt/jp1pc/tools/

Arguments

-f target-file-name

Specifies a name for the alarm definition file to which definition information is to be exported. The file name can be expressed as a relative path or an absolute path.

The string you specify can have double-byte characters, single-byte alphanumeric characters, single-byte spaces, and the following single-byte symbols:

% - ( ) _ . @ [ ]

If the value contains a space, enclose the entire value in double quotation marks ("). If the value contains a defined symbol, specify an escape character if necessary.

-key service-key

Specifies the service key of the PFM - Agent or PFM - RM for which alarm definition information is to be exported. A product name can also be specified when the product name display functionality is enabled. You can specify only the service key of PFM - Agent or PFM - RM here. For details about the service key of the PFM - Agent or PFM - RM, see the naming rules described in the appendix of the JP1/Performance Management Planning and Configuration Guide.

The -key and -template options are mutually exclusive.

-table alarm-table-name

Specifies the name of the alarm table that contains the alarm definition information to be exported.

For alarm-table-name, specify a string of 1 to 64 bytes long, consisting of double-byte characters, single-byte alphanumeric characters, single-byte spaces, and the following single-byte symbols:

% - ( ) _ . / @ [ ]

If the value contains a space, enclose the entire value in double quotation marks ("). If the value contains a defined symbol, specify an escape character if necessary.

Wildcard characters cannot be used.

The -table and -template options are mutually exclusive.

-alarm alarm-name

Specifies the name of the alarm whose alarm definition information is to be exported.

For alarm-table, specify a string of 1 to 20 bytes long, consisting of double-byte characters, single-byte alphanumeric characters, single-byte spaces, and the following single-byte symbols:

% - ( ) _ . / @ [ ]

If the value contains a space, enclose the entire value in double quotation marks ("). If the value contains a defined symbol, specify an escape character if necessary.

Wildcard characters cannot be used.

The -alarm and -template options are mutually exclusive.

-only

Specifies that only user-defined alarm tables are to be output#. The file output with this option specified can be used as the alarm definition file to be imported with the jpctool alarm import command.

#

Monitoring templates (alarm tables whose names begin with PFM) are not output.

The -only and -template options are mutually exclusive.

-template

Specifies that the template for the alarm definition file is to be output.

This option cannot be specified together with the -key, -table, -alarm, or -only option.

-y|-n

Specifies whether or not the alarm definition file specified in the -f option is to be overwritten forcibly if it already exists.

When -y is specified, the command forcibly overwrites an existing alarm definition file.

When -n is specified, the command skips overwrite processing.

When this option is omitted, the command displays a confirmation message asking whether or not an existing alarm definition file is to be overwritten.

-wait number-of-seconds

Specifies the maximum wait period (in seconds) applied when a command that cannot be executed with this command is running. When the setting to suspend execution of alarm commands (Alarm Command Wait Mode) is enabled in the startup information file (jpccomm.ini), if you want to specify a wait period (in seconds) separately from the wait period specified in the jpccomm.ini file, specify a value in the range from 1 to 3,600 for this option.

If you omit the option, this command runs with the wait period (in seconds) specified in the jpccomm.ini file.

For details on the commands that cannot be executed with this command, see Commands that cannot be executed with alarm commands. For details on the jpccomm.ini file and Alarm Command Wait Mode, see Startup information file (jpccomm.ini).

Alarm definition file format

See the description of the alarm definition file format in the jpctool alarm import command.

Notes

Return values

0

The command terminated normally.

1

An argument specification is invalid.

2

The user does not have execution permission for the command.

3

At least one of the Name Server, Master Manager, and View Server services is not running.

4

The startup stop command or another setup command was executed on the same machine.

5

The command was executed on a host that is not the PFM - Manager host. Alternatively, the agent to which alarms are to be exported has not been set up.

6

The specified alarm table or alarm is missing, or the alarm definition was not found at the agent with the specified service key.

11

The user canceled the processing.

100

The Performance Management environment is invalid.

200

A memory shortage occurred.

210

A disk space shortage occurred.

211

A target file cannot be accessed.

222

A communication error occurred.

223

Communication processing resulted in a timeout.

255

An unexpected error occurred.

Usage example 1

In this example, alarm table alarmtable1 is not a monitoring template, but is assumed to be defined for PFM - Agent for Platform (UNIX). Alarm table alarmtable1 is also assumed to have alarm alarm1 defined.

The following command exports all the alarm definitions defined for PFM - Agent for Platform (UNIX) to the alarmtable1.cfg file under the /tmp directory:

jpctool alarm export -f /tmp/alarmtable1.cfg -key UNIX

Output result 1 (alarmtable1.cfg)

Alarm Definition File Version=0002
Alarm Definition File Code=C
 
[Alarm Data]
[[General]]
Product=U3.0
Alarm Table Name="PFM UNIX Solution Alarms 8.00"
Alarm Name="Disk Service Time"
Message Text="Average disk service time is %CVS secs"
Check Value Exist=N
   :
[Alarm Data]
[[General]]
Product=U4.0
Alarm Table Name=alarmtable1
Alarm Name=alarm1
Message Text=
Check Value Exist=N
   :

Usage example 2

This example exports the Disk Service Time alarm definition to the file alarm2.cfg in the /tmp directory of the alarms defined in the PFM UNIX Solution Alarms 8.00 monitoring template for PFM - Agent for Platform (UNIX).

jpctool alarm export -f /tmp/alarm2.cfg -key UNIX -table "PFM UNIX Solution Alarms 8.00" -alarm "Disk Service Time"

Output result 2 (alarm2.cfg)

Alarm Definition File Version=0002
Alarm Definition File Code=C
 
[Alarm Data]
[[General]]
Product=U3.0
Alarm Table Name="PFM UNIX Solution Alarms 8.00"
Alarm Name="Disk Service Time"
Message Text="Average disk service time is %CVS secs"
Check Value Exist=N
   :

Usage example 3

This example outputs the alarm definition file template to the template3.cfg file under the /tmp directory:

jpctool alarm export -f /tmp/template3.cfg -template

Output result 3 (template3.cfg)

Alarm Definition File Version=0002
Alarm Definition File Code=
 
[Alarm Data]
[[General]]
Product=
Alarm Table Name=
Alarm Name=
Message Text=
Check Value Exist=N
 
[[Advanced Setting]]
Active Alarm=Y
Regular Alarm=Y
Evaluate All Data=N
Notify State=Alarm
Monitoring Regularly=N
Monitoring Time=
Damping=N
Damping Count=
 
[[Check Value Exist]]
Record=
Field=
Value=
 
[[Alarm Condition Expressions]]
Condition=
 
[[Actions]]
Report=
E-mail=Abnormal,Warning,Normal
Command=Abnormal,Warning,Normal
SNMP=Abnormal,Warning,Normal
JP1 Event=N
 
[[Action Definition E-mail]]
E-mail Address=
Action Handler=
[[[Message Text]]]
Date: %SCT
Host: %HNS
 
Product: %PTS
Agent: %ANS
 
Alarm: %AIS (%ATS)
State: %SCS
 
Message: %MTS
[[Action Definition Command]]
Command Name=
Action Handler=
[[[Message Text]]]
 
[[Action Definition JP1 Event]]
Event ID=
Action Handler=
Message=%MTS
Switch Alarm Level=Y
Exec Logical Host=