Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Command and Definition File Reference


jcadefconv

Organization of this page

Function

This command converts an action definition file from version earlier than 11-50 (DESC_VERSION value is less than 4) to version 11-50 or later (DESC_VERSION value is 4).

If the action definition file for version 8 or earlier uses any of the characters listed below in its messages or in basic event information, detailed event information, or extended event information, the file is converted and defined.

Table 1‒2: Character conversion

Character before conversion

Characters after conversion

\/

/

Space

%20

%

%25

Before it executes this conversion, this command automatically checks the format of the action definition file. If it detects any errors, the action definition file is not converted and the command outputs error messages to standard error.

You can specify any output destination for the converted action definition file.

An action definition file is converted from version 8 or earlier to version 11-50 or later as shown below.

Table 1‒3: Conversion of action definition files

Format of version 8 or earlier

Format of version 11-50 or later

Remarks

No DESC_VERSION

DESC_VERSION=4

--

DESC_VERSION=1

DESC_VERSION=4

--

DESC_VERSION=2

DESC_VERSION=4

--

DESC_VERSION=3

DESC_VERSION=4

--

:state_watch=true

cmn

[Figure]staΔtrue

end-cmn

--

:state_watch=false

cmn

[Figure]staΔfalse

end-cmn

--

:state_watch not specified

cmn

[Figure]staΔfalse

end-cmn

--

#comment-1

+0Δ*Δ:action.exe

actΔaction-1

[Figure]prmΔ0

[Figure]cmtΔcomment-1

. . .

end-act

--

#Δcomment-1

+0Δ*Δ:action.exe

actΔaction-1

[Figure]prmΔ0

[Figure]cmt[Figure]comment-1

. . .

end-act

--

#comment-1

#comment-2

+0Δ*Δ:action.exe

actΔaction-1

[Figure]prmΔ0

[Figure]cmtΔcomment-2

. . .

end-act

--

Action specifying a parameter group

actΔaction-serial-number

When the command is executed in an Japanese language environment

actΔaction-serial-number

When the command is executed in an English language environment

AND action

act

--

+parameter-group-number

[Figure]prmΔparameter-group-number

--

&

[Figure]prmΔ&

--

$basic-part-of-event-ID

[Figure]eidΔbasic-part-of-event-ID

--

$basic-part-of-event-ID:extended-part-of-event-ID

[Figure]eidΔbasic-part-of-event-ID:extended-part-of-event-ID

--

*

[Figure]eidΔ*

--

/message/

[Figure]B.MESSAGEΔREGEXΔmessage

--

/basic-event-information/

[Figure]B.BASICΔREGEXΔbasic-event-information

--

/detailed-event-information/

[Figure]B.DETAILΔREGEXΔdetailed-event-information

--

//

No condition is set

--

/-------E/

[Figure]E.SEVERITYΔINΔEmergency

--

/------A-/

[Figure]E.SEVERITYΔINΔAlert

--

/-----C--/

[Figure]E.SEVERITYΔINΔCritical

--

/----E---/

[Figure]E.SEVERITYΔINΔError

--

/---W----/

[Figure]E.SEVERITYΔINΔWarning

--

/--N-----/

[Figure]E.SEVERITYΔINΔNotice

--

/-I------/

[Figure]E.SEVERITYΔINΔInformation

--

/D-------/

[Figure]E.SEVERITYΔINΔDebug

--

/DINWECAE/

[Figure]E.SEVERITYΔINΔEmergencyΔAlertΔCriticalΔErrorΔWarningΔNoticeΔInformationΔDebug

When a condition with multiple event levels is specified

extended-event-information-attribute-name=/attribute-value/

[Figure]E.extended-event-information-attribute-nameΔREGEXΔattribute-value

--

u=user-name

[Figure]usrΔuser-name

--

e=environment-variable-file-name

[Figure]varΔenvironment-variable-file-name

--

d=execution-host-name

[Figure]hstΔexecution-host-name

--

d=group-name

[Figure]hstΔgroup-name

--

dt=suppression-time

[Figure]detΔsuppression-time

--

rt=delay-monitoring-period

[Figure]retΔdelay-monitoring-period

--

+0Δ*Δ:action

[Figure]cmdΔaction

--

+0Δ*Δ:<RULE>

[Figure]rule

When JP1/IM - RL is executed

+0Δ*Δ:action.exe

actΔaction-1

[Figure]prmΔ0

[Figure]eidΔ*

[Figure]cnd

[Figure]end-cnd

[Figure]cmdΔaction.exe

end-act

When there is no event condition

+0Δ*Δ/message/ : action.exe

actΔaction-1

[Figure]prmΔ0

[Figure]eidΔ*

[Figure]cnd

[Figure]B.MESSAGEΔREGEXΔmessage

[Figure]end-cnd

[Figure]cmdΔaction.exe

end-act

When there is an event condition

--

aidΔ action-ID

An action ID is assigned to an action execution condition from the top of the action definition in the order at which the action execution conditions are listed. The ID increments from 0 to 2,147,483,647. Note that no action ID is assigned to the action execution condition whose parameter group is set to &.

--

validΔtrue

The valid parameter is set to true (enabled). However, this parameter is not changed for the action execution condition whose parameter group is set to &.

Legend:

[Figure]: Indicates a tab

Δ: Indicates a space

--: None

Format

jcadefconv -i action-definition-file-name-before-conversion
           -o action-definition-file-name-after-conversion
          [-h logical-host-name]

Execution permission

In Windows: Administrator permissions

In UNIX: Superuser permissions

Storage directory

In Windows:

Console-path\bin\

In UNIX:

/opt/jp1cons/bin/

Arguments

-i action-definition-file-name-before-conversion

Specifies the relative or absolute path name of the action definition file that is to be converted. If the path name of the action definition file contains a space, enclose the entire path name in double quotation marks ("). The file name can consist of a maximum of 255 bytes.

-o action-definition-file-name-after-conversion

Specifies the relative or absolute path name of the action definition file that is obtained after conversion. If the path name of the action definition file contains a space, enclose the entire path name in double quotation marks ("). The file name can consist of a maximum of 255 bytes.

Note that the following characters and character strings cannot be specified in a file name in Windows:

  • Characters: : ? " < > |

  • A character string that completely matches any of the following strings (not case sensitive): CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

The user can select any name for action-definition-file-name-after-conversion, except that it cannot be the file name specified in the -i option. Furthermore, if a file that has the same name as the name of the file specified in the -o option, the KAVB5504-E message is displayed and the program terminates.

-h logical-host-name

When you are operating in a cluster system, this option specifies the logical host name. The command checks the contents of the definition file to be converted by using regular expressions used by the specified logical host.

If this option is omitted, the command assumes the logical host name specified in the JP1_HOSTNAME environment variable. If the JP1_HOSTNAME environment variable is not specified, the command assumes the physical host name.

Notes

Return values

0

Normal termination

1

Abnormal termination

2

Termination with warning

Example

The following is an example of converting an action definition file that was created in the format of version 8 or earlier to the format of version 11-50 or later:

jcadefconv  -i actdef.conf  -o actdef_new.conf

The example assumes the following contents for the action definition file created in the format of version 8 or earlier:

DESC_VERSION=2
:state_watch=true
#comment
+0 $0000000A /message/,/basic-event-information/,/detailed-event-information/,/-------E/ ATTR1=/attribute-value-1/ : u=user-name e=environment-variable-file-name d=execution-host-name dt=20 rt=30 action

When the jcadefconv command is executed, the file is converted as follows:

DESC_VERSION=4
cmn
  sta true
end-cmn
act action-1
  aid action-ID
  valid true
  prm 0
  cmt comment
  eid A
  cnd
    B.MESSAGE REGEX message
    B.BASIC REGEX basic-event-information
    B.DETAIL REGEX detailed-event-information
    E.SEVERITY IN Emergency
    E.ATTR1 REGEX attribute-value-1
  end-cnd
 
  usr user-name
  hst execution-host-name
  cmd action
  var environment-variable-file-name
  det 20
  ret 30
end-act