| Rule Templates
and an easier way to
apply rules and Historical command
files to domain based entities
Many people have expressed the need to be able to apply one
alarm rule to all entities of the same class within a domain.
For example, for all DECnet Phase IV nodes, apply this rule
that checks for reachability. Today, there hasn't been any
easy way to this this. The user would have to create one rule
for one entity, copy the file to a new file, edit the entity
instance and the rule name, exit from the editor, copy the file
to a new file and so on for all entities. This is impractical
for network managers with large numbers of entities to manage.
The solution to this problem in the immediate term is solved by
using the two utility command files to be described in this
document. The longer term and right approach is for DECmcc to
provide entity instance wildcarding so that one single rule can
be applied to all entities of a given class within a domain,
not one rule per instance. This will be provided in a future
release of the product.
The first utility command file is called MCC_WCARD.COM. It is
invoked simply by typing @MCC_WCARD. The user is prompted for
a "List File name", a "Domain name", a "Global Entity Class
name", and a "Template File name".
The List File is created either by the user using an editor or
by previously running MCC_WCARD. It contains a list of entity
instances for a given class, and usually should be for a given
domain. If the user wants their domain read for an up-to-date
list of instances, for a given class, they can simply enter a
<CR> indicating that no List File is to be used. If the List
File is being used, you do not have to have DECmcc installed on
the system you are running MCC_WCARD.
The Domain name is used in two ways. One use is that it will
be passed to the Template File (to be described later), and the
second use is that if the List File name was not enter, the
specified Domain will actually be read and the output parsed by
MCC_WCARD to determine what instances exist for the specified
class. Note that you must have DECmcc installed on the system
you run on if you use this option.
The Global Entity Class name is passed to the Template File and
if the List File is not being used, it is used to search the
contents of the Domain named above looking for the instances.
Common Global Entity Class names are NODE4, NODE, BRIDGE, SNMP,
DOMAIN, STATION, etc.
The Template File is any DECmcc command file such as an Alarm
command file or a Historian command file. There are currently
four "variables" you can use within the Template file. These
are:
?domain? Where ever you use ?domain?, the Domain name
entered will be substituted.
?class? Where ever you use ?class?, the Class name
entered will be substituted.
?instance? Where ever you use ?instance?, the instance
name will be substituted. The instance name is
in the form of 'full name' and comes either
directly from the List File specified or by
reading the specified Domain and searching for
instance names (for a given class).
?simple? Where ever you use ?simple?, the simple name is
used. The simple name is the right most part
of the instance name up to, but not including
the dot. For example if the instance name is
.LKG.ENG.FLOOR1.HAWK2, the simple name is
HAWK2.
The command files that are generated from the
template file as a result of running MCC_WCARD
are TemplateFileName_Simple.FileExt. For
example if the Template File name is
NODE4_UNREACHABLE.COM, and you have two nodes
in your domain called HAWK2 and BSYBEE, the
resulting command files generated would be:
NODE4_UNREACHABLE_HAWK2.COM and
NODE4_UNREACHABLE_BSYBEE.COM
Description of SYS$SCRATCH:MCC_MASTER_COMMAND.COM
After you are prompted for the four pieces of information (List
File, Domain name, Global Entity Class, and Template File
name), the MCC_WCARD displays
Creating master command file:SYS$SCRATCH:MCC_MASTER_COMMAND.COM
This file is used to execute the newly created command files
that have been generated. In the above example, it would
contain:
@NODE4_UNREACHABLE_HAWK2.COM
@NODE4_UNREACHABLE_BSYBEE.COM
When you want to execute them you would enter DECmcc's Form and
Command line interface (FCL) and do the following:
$ MANAGE/ENTERPRISE
DECmcc V1.1.0
MCC> @SYS$SCRATCH:MCC_MASTER_COMMAND.COM
Description of SYS$SCRATCH:MCC_INSTANCE_LIST.TMP
If no List File is entered, the specified Domain Name is read.
The output is then parsed and a list of instances is produced.
Again using the above as my example, the contents would be:
.HAWK2
.BSYBEE
If you wish to apply more than one template file to all the
entities of a given class within the domain you would
(probably) execute MCC_WCARD the first time entering <cr> for
the list file name. MCC_WCARD would read the domain and create
the SYS$SCRATCH:MCC_MASTER_COMMAND.COM file and apply the first
Template File. Now when you wish to apply the second and
subsequent Template files you would enter
SYS$SCRATCH:MCC_MASTER_COMMAND.COM for the list file name.
This would save the time needed to re-read the Domain and parse
the instance names. If your domain is fairly static, meaning
you aren't adding or removing instances, you can save this file
by copying it to another file name such as
NODE4_LITTLETON_MASS.LST and use it at a later time.
Sample use of MCC_WCARD command utility:
Hawk2> @MCC_WCARD
Enter List File name (enter CR for none):
Enter DOMAIN name : LITTLETON_MASS
Enter Global Entity Class name : NODE4
Enter Template File name : PEAK_LINKS.COM
Creating master command file: SYS$SCRATCH:MCC_MASTER_COMMAND.COM
Creating instance list file: SYS$SCRATCH:MCC_INSTANCE_LIST.TMP
Reading Domain, please wait...
DECmcc (V1.1.0)
Done reading Domain, continuing...
Creating file: PEAK_LINKS_BSYBEE.COM
Creating file: PEAK_LINKS_HAWK2.COM
Creating file: PEAK_LINKS_POLE.COM
Done.
Hawk2>
Hawk2> TYPE MCC_INSTANCE_LIST.TMP
.BSYBEE
.HAWK2
.POLE
Hawk2>
Hawk2> TYPE PEAK_LINKS.COM
!=====================================================================
! PEAK_LINKS_?SIMPLE?.COM
!=====================================================================
! =: Traffic Indicator :=
!
! Domain: ?domain?
! Entity Class: ?class?
! Instance: ?instance?
!
DISABLE MCC 0 ALARMS RULE PEAK_LINKS_?simple? , in domain ?domain?
!
DELETE MCC 0 ALARMS RULE PEAK_LINKS_?simple? , in domain ?domain?
!
CREATE MCC 0 ALARMS RULE PEAK_LINKS_?simple? -
EXPRESSION = (?class? ?instance? MAXIMUM LOGICAL LINKS ACTIVE>30,-
AT EVERY 12:00:00),-
PERCEIVED SEVERITY = CRITICAL,-
PROCEDURE = MCC_COMMON:MCC_ALARMS_LOG_ALARM.COM,-
CATEGORY = "Traffic Indicator",-
DESCRIPTION = "This is a sample DECNET NODE4 rule. Template -
<PEAK_LINKS.COM> was used to create -
this rule.",-
IN DOMAIN = ?domain?
!
Enable MCC 0 ALARMS RULE PEAK_LINKS_?simple? , in domain ?domain?
!
!
Hawk2>
Hawk2> TYPE PEAK_LINKS_BSYBEE.COM
!=====================================================================
! PEAK_LINKS_BSYBEE.COM
!=====================================================================
! =: Traffic Indicator :=
!
! Domain: LITTLETON_MASS
! Entity Class: NODE4
! Instance: .BSYBEE
!
DISABLE MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE , in domain LITTLETON_MASS
!
DELETE MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE , in domain LITTLETON_MASS
!
CREATE MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE -
EXPRESSION = (NODE4 .BSYBEE MAXIMUM LOGICAL LINKS ACTIVE>30,-
AT EVERY 12:00:00),-
PERCEIVED SEVERITY = CRITICAL,-
PROCEDURE = MCC_COMMON:MCC_ALARMS_LOG_ALARM.COM,-
CATEGORY = "Traffic Indicator",-
DESCRIPTION = "This is a sample DECNET NODE4 rule. Template -
<PEAK_LINKS.COM> was used to create -
this rule.",-
IN DOMAIN = LITTLETON_MASS
!
Enable MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE , in domain LITTLETON_MASS
!
!
Hawk2>
Hawk2> TYPE PEAK_LINKS_HAWK2.COM
!=====================================================================
! PEAK_LINKS_HAWK2.COM
!=====================================================================
! =: Traffic Indicator :=
!
! Domain: LITTLETON_MASS
! Entity Class: NODE4
! Instance: .HAWK2
!
DISABLE MCC 0 ALARMS RULE PEAK_LINKS_HAWK2 , in domain LITTLETON_MASS
!
DELETE MCC 0 ALARMS RULE PEAK_LINKS_HAWK2 , in domain LITTLETON_MASS
!
CREATE MCC 0 ALARMS RULE PEAK_LINKS_HAWK2 -
EXPRESSION = (NODE4 .HAWK2 MAXIMUM LOGICAL LINKS ACTIVE>30,-
AT EVERY 12:00:00),-
PERCEIVED SEVERITY = CRITICAL,-
PROCEDURE = MCC_COMMON:MCC_ALARMS_LOG_ALARM.COM,-
CATEGORY = "Traffic Indicator",-
DESCRIPTION = "This is a sample DECNET NODE4 rule. Template -
<PEAK_LINKS.COM> was used to create -
this rule.",-
IN DOMAIN = LITTLETON_MASS
!
Enable MCC 0 ALARMS RULE PEAK_LINKS_HAWK2 , in domain LITTLETON_MASS
!
!
Hawk2>
Hawk2> MANAGE/ENTERPRISE
DECmcc (V1.1.0)
MCC> @MCC_MASTER_COMMAND.COM
MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE
AT 24-MAY-1991 10:37:41
Normal operation previously terminated.
MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE
AT 24-MAY-1991 10:37:42
Entity deleted successfully.
MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE
AT 24-MAY-1991 10:37:44
Entity created successfully.
MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE
AT 24-MAY-1991 10:37:47
Normal operation has begun.
MCC 0 ALARMS RULE PEAK_LINKS_HAWK2
AT 24-MAY-1991 10:37:49
Normal operation previously terminated.
MCC 0 ALARMS RULE PEAK_LINKS_HAWK2
AT 24-MAY-1991 10:37:50
Entity deleted successfully.
MCC 0 ALARMS RULE PEAK_LINKS_HAWK2
AT 24-MAY-1991 10:37:50
Entity created successfully.
MCC 0 ALARMS RULE PEAK_LINKS_HAWK2
AT 24-MAY-1991 10:37:51
Normal operation has begun.
MCC 0 ALARMS RULE PEAK_LINKS_POLE
AT 24-MAY-1991 10:37:52
Normal operation previously terminated.
MCC 0 ALARMS RULE PEAK_LINKS_POLE
AT 24-MAY-1991 10:37:52
Entity deleted successfully.
MCC 0 ALARMS RULE PEAK_LINKS_POLE
AT 24-MAY-1991 10:37:53
Entity created successfully.
MCC 0 ALARMS RULE PEAK_LINKS_POLE
AT 24-MAY-1991 10:37:54
Normal operation has begun.
MCC> EXIT
Hawk2>
Hawk2> @MCC_WCARD
Enter List File name (enter CR for none): MCC_INSTANCE_LIST.TMP
Enter DOMAIN name : LITTLETON_MASS
Enter Global Entity Class name : NODE4
Enter Template File name : ENABLE_PEAK_LINKS.COM
Creating master command file: SYS$SCRATCH:MCC_MASTER_COMMAND.COM
Creating file: ENABLE_PEAK_LINKS_BSYBEE.COM
Creating file: ENABLE_PEAK_LINKS_HAWK2.COM
Creating file: ENABLE_PEAK_LINKS_POLE.COM
Done.
Hawk2>
Hawk2> TYPE MCC_MASTER_COMMAND.COM
@ENABLE_PEAK_LINKS_BSYBEE.COM
@ENABLE_PEAK_LINKS_HAWK2.COM
@ENABLE_PEAK_LINKS_POLE.COM
Hawk2> TYPE ENABLE_PEAK_LINKS.COM
!
! Simple DECmcc command file to enable an
! existing rule.
!
Enable MCC 0 ALARMS RULE PEAK_LINKS_?simple? , in domain ?domain?
Hawk2>
Hawk2> TYPE ENABLE_PEAK_LINKS_BSYBEE.COM
!
! Simple DECmcc command file to enable an
! existing rule.
!
Enable MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE , in domain LITTLETON_MASS
Hawk2>
Hawk2> TYPE ENABLE_PEAK_LINKS_HAWK2.COM
!
! Simple DECmcc command file to enable an
! existing rule.
!
Enable MCC 0 ALARMS RULE PEAK_LINKS_HAWK2 , in domain LITTLETON_MASS
Hawk2>
Hawk2> COPY MCC_MASTER_COMMAND.COM ENABLE_PEAK_LINKS_MASTER.COM
Hawk2>
Hawk2> MANAGE/ENTERPRISE
DECmcc (V1.1.0)
MCC> @ENABLE_PEAK_LINKS_MASTER.COM
MCC 0 ALARMS RULE PEAK_LINKS_BSYBEE
AT 24-MAY-1991 10:40:45
Normal operation has begun.
MCC 0 ALARMS RULE PEAK_LINKS_HAWK2
AT 24-MAY-1991 10:40:47
Normal operation has begun.
MCC 0 ALARMS RULE PEAK_LINKS_POLE
AT 24-MAY-1991 10:40:50
Normal operation has begun.
MCC> EXIT
Hawk2>
Hawk2>
In addition to the MCC_WCARD command file there is a second
command file called MCC_SUB. This command file is used by
MCC_WCARD but can also be used by the end user directly. You
would use this if you wanted to manually take the template file
and create a specific MCC command file on a one shot basis
rather than using the List File or by reading the domain.
To execute MCC_SUB, just type
$ @MCC_SUB
You will be prompted for the Template File, Domain Name, Entity
Class, and Instance Name.
|