jcadefconv
- Organization of this page
Function
This command converts an action definition file from version 8 or earlier (DESC_VERSION value is less than 3) to version 09-00 (DESC_VERSION value is 3).
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.
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 09-00 as shown below.
Format of version 8 or earlier |
Format of version 09-00 |
Remarks |
---|---|---|
No DESC_VERSION |
DESC_VERSION=3 |
-- |
DESC_VERSION=1 |
DESC_VERSION=3 |
-- |
DESC_VERSION=2 |
DESC_VERSION=3 |
-- |
:state_watch=true |
cmn statrue end-cmn |
-- |
:state_watch=false |
cmn stafalse end-cmn |
-- |
:state_watch not specified |
cmn stafalse end-cmn |
-- |
#comment-1 +0*:action.exe |
actaction-1 prm0 cmtcomment-1 . . . end-act |
-- |
#comment-1 +0*:action.exe |
actaction-1 prm0 cmtcomment-1 . . . end-act |
-- |
#comment-1 #comment-2 +0*:action.exe |
actaction-1 prm0 cmtcomment-2 . . . end-act |
-- |
Action specifying a parameter group |
actaction-serial-number |
When the command is executed in an Japanese language environment |
actaction-serial-number |
When the command is executed in an English language environment |
|
AND action |
act |
-- |
+parameter-group-number |
prmparameter-group-number |
-- |
& |
prm& |
-- |
$basic-part-of-event-ID |
eidbasic-part-of-event-ID |
-- |
$basic-part-of-event-ID:extended-part-of-event-ID |
eidbasic-part-of-event-ID:extended-part-of-event-ID |
-- |
* |
eid* |
-- |
/message/ |
B.MESSAGEREGEXmessage |
-- |
/basic-event-information/ |
B.BASICREGEXbasic-event-information |
-- |
/detailed-event-information/ |
B.DETAILREGEXdetailed-event-information |
-- |
// |
No condition is set |
-- |
/-------E/ |
E.SEVERITYINEmergency |
-- |
/------A-/ |
E.SEVERITYINAlert |
-- |
/-----C--/ |
E.SEVERITYINCritical |
-- |
/----E---/ |
E.SEVERITYINError |
-- |
/---W----/ |
E.SEVERITYINWarning |
-- |
/--N-----/ |
E.SEVERITYINNotice |
-- |
/-I------/ |
E.SEVERITYINInformation |
-- |
/D-------/ |
E.SEVERITYINDebug |
-- |
/DINWECAE/ |
E.SEVERITYINEmergencyAlertCriticalErrorWarningNoticeInformationDebug |
When a condition with multiple event levels is specified |
extended-event-information-attribute-name=/attribute-value/ |
E.extended-event-information-attribute-nameREGEXattribute-value |
-- |
u=user-name |
usruser-name |
-- |
e=environment-variable-file-name |
varenvironment-variable-file-name |
-- |
d=execution-host-name |
hstexecution-host-name |
-- |
d=group-name |
hstgroup-name |
-- |
dt=suppression-time |
detsuppression-time |
-- |
rt=delay-monitoring-period |
retdelay-monitoring-period |
-- |
+0*:action |
cmdaction |
-- |
+0*:<RULE> |
rule |
When JP1/IM - RL is executed |
+0*:action.exe |
actaction-1 prm0 eid* cnd end-cnd cmdaction.exe end-act |
When there is no event condition |
+0*/message/ : action.exe |
actaction-1 prm0 eid* cnd B.MESSAGEREGEXmessage end-cnd cmdaction.exe end-act |
When there is an event condition |
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
When a file is converted to the format of version 09-00, some items become undefined. If such an undefined item is present, the KAVB5503-W message is displayed. Follow the directions in the message to correct the action definition file, and then use the jcamakea command to check that the definition file has been corrected successfully.
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 09-00:
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=3 cmn sta true end-cmn act action-1 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