[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

3489.0. "Automatic rules enable in DECwindows" by CSOADM::ROTH (I'm getting closer to my home...) Mon Aug 03 1992 17:43

I have read the documentation and somewhat confused myself regarding enabling
alarm rules.

Here is my situation:

There are 3 different 'departments' (A,B,C). Each department has their own 
department domain with a few domains under that one. Like this:


                A                   B                       C    
               /|\                 /|\                     /|\    
              / | \               / | \                   / | \   
             /  |  \             /  |  \                 /  |  \  
            A1 A2  A3           B1 B2  B3               C1 C2  C3


Each department has a network 'supervisor' that will be logging into DECmcc
to view the department hierarchy. Thus we have MCC users SUPER_A,SUPER_B,
SUPER_C.

There is also network manager that needs to oversee the entire network
operations... A, B and C. He/she will will log into DECmcc as user NETMGR
and need to monitor hierarchies A, B and C.

All users are using the windows interface.

The following requirements must be met:

1) When user SUPER_(A,B,C) logs in, alarms rules throughout their entire
   heirarchy will automatically be enabled (no manual intervention
   required) so that events within their hierarchy will cause a color
   change on their screen.

2) Ditto requirement #1 for user NETMGR - automatic rules enabling for all
   domains.

3) On a 24hr, 7day basis any rule firing will invoke a DCL procedure. This
   is so that VAXmail, paging, etc. can occur. This will run even though
   no user has an active window.


What kinds of gyrations would I have to do to accomplish #1 & #2?

Would a batch job with a ENABLE DOMAIN * RULE * followed by a SHOW DOMAIN
* ALL CHAR, AT START = (+999-00:00:00) take care of #3?


Thanks,

Lee
T.RTitleUserPersonal
Name
DateLines
3489.1Batch will do itTOOK::R_SPENCENets don't fail me now...Fri Oct 09 1992 15:0010
    The Batch job to keep the rules running is the best bet.
    
    Then, when the users log in and start up DECmcc, if the top level
    domain is automaticly opened and notification is started, they will
    get the results of the rules firing and don't nesessarily need their
    own rules.
    
    The next reply has an example batch job you could use.
    
    s/rob
3489.2BATCH_RULES.COMTOOK::R_SPENCENets don't fail me now...Fri Oct 09 1992 15:01146
$ REVISION  = "V1.0-8"
$ set noverify
$!
$!
$!***************************************************************************
$!*                                                                         *
$!*  COPYRIGHT (c) 1991 BY                                             *
$!*  DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS.                 *
$!*  ALL RIGHTS RESERVED.                                                   *
$!*                                                                         *
$!*  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED  *
$!*  ONLY IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE  *
$!*  INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR  ANY  OTHER  *
$!*  COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY  *
$!*  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE IS  HEREBY  *
$!*  TRANSFERRED.                                                           *
$!*                                                                         *
$!*  THE INFORMATION IN THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT NOTICE  *
$!*  AND  SHOULD  NOT  BE  CONSTRUED AS  A COMMITMENT BY DIGITAL EQUIPMENT  *
$!*  CORPORATION.                                                           *
$!*                                                                         *
$!*  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE  OR  RELIABILITY OF ITS  *
$!*  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.                *
$!*                                                                         *
$!*                                                                         *
$!***************************************************************************
$!
$!++
$! Facility:	DECmcc Director Alarms Tools
$!
$! Module:	BATCH_RULES.COM
$!
$! Abstract:	
$!
$! Inputs:    P1 optionally contains name of domain for rules. If left
$!		out, then all rules will be enabled.
$!
$! Outputs:     
$!		"SYS$SCRATCH:MCC''pid'ENABLE.TMP"
$!		"SYS$SCRATCH:MCC''pid'STATUS.TMP"
$!		 SYS$LOGIN:BATCH_RULES_ENABLE.COM
$!		 SYS$LOGIN:BATCH_RULES_SHOW_STATUS.COM
$!
$! Dependancies: MCC_READ_RULES.COM
$!		This file should be in the same directory as BATCH_RULES.COM
$!
$! Author:	Rob Spence
$!
$! Created:	July 1991
$!
$! Usage:
$!	Submit to Batch to enable ALL alarm rules in this instance of
$!	DECmcc. Will exit and re-enable rules periodically to permit
$!	production rules to be changed or updated as needed.
$!----------------------------------------------------------------------------
$! Initialization
$ set noon
$ set output_rate=0:05:00
$ set proces/name="mcc_batch_rules"
$ NODE              = f$getsyi("nodename")
$ if node .eqs. "" then
  NODE              = f$trnlmn("SYS$NODE")
$ PID               = f$getjpi("0","PID")
$ vms_version       = f$getsyi("VERSION")
$ hardware          = f$getsyi("HW_NAME")
$!
$ procedure_file    = -
  F$ENVIRONMENT("PROCEDURE") - f$parse(F$ENVIRONMENT("PROCEDURE"),,,"VERSION")
$ procedure_log     = f$parse(procedure_file,,,"NAME") + ".LOG
$ procedure_dir     = f$parse(F$ENVIRONMENT("PROCEDURE"),,,"DEVICE") -
			+f$parse(F$ENVIRONMENT("PROCEDURE"),,,"DIRECTORY")
$!
$ enable_file       = "SYS$SCRATCH:MCC''pid'ENABLE.TMP"
$ status_file       = "SYS$SCRATCH:MCC''pid'STATUS.TMP"
$!
$! Verify DCL commands are as expected
$ copy             := copy
$ purge            := purge
$ delete           := delete/nolog
$ submit           := submit
$!
$ wo               := write sys$output
$ we               := write sys$error
$!
$ wo "BATCH_RULES ''revision'  ''f$time()',"
$ wo "          on node ''node', a ''hardware', running VMS ''vms_version'"
$ wo ""
$!
$ if 'p1' .eqs. ""
$	then
$		domain_spec = "*"
$	else
$		domain_spec = "''p1'"
$ endif
$main:
$ open/write e_file 'enable_file'
$ write e_file "!DECmcc commands to enable rules in requested domains"
$ write e_file "ENABLE DOMAIN ''domain_spec' RULE *"
$ close e_file
$!
$ open/write s_file 'enable_file'
$ write s_file "!DECmcc commands to show rule status in requested domains"
$ write s_file "SHOW DOMAIN ''domain_spec' RULE * ALL STATUS, ALL COUNTERS"
$ close s_file
$!
$ copy/log -
	'enable_file' -
	SYS$LOGIN:BATCH_RULES_ENABLE.COM
$!
$ copy/log -
	'status_file' -
	SYS$LOGIN:BATCH_RULES_SHOW_STATUS.COM
$!
$ show time
$Manage/Enterprise
	use verify
!
	do sys$login:batch_rules_enable
	do sys$login:batch_rules_show_status
!
!	show mcc 0 all char, at start=tomorrow    !at midnight
!
	show mcc 0 all char, at start +03:00:00   !every 3 hours
	do sys$login:batch_rules_show_status
!
	show mcc 0 all char, at start +03:00:00   !every 3 hours
	do sys$login:batch_rules_show_status
!
	show mcc 0 all char, at start +03:00:00   !every 3 hours
	do sys$login:batch_rules_show_status
!
	show mcc 0 all char, at start +03:00:00   !every 3 hours
	do sys$login:batch_rules_show_status
!
!
    exit  !This will disable the rules cleanly
$!
$clean_up:
$ show time
$ wo "Clean up old files"
$ purge/log/keep=10 'procedure_log'
$ purge/log/keep=5 SYS$LOGIN:BATCH_RULES_ENABLE_ALL.COM
$ purge/log/keep=7 SYS$SCRATCH:MCC_ENABLE_ALL_RULES.COM
$ wo "Re-submit ''procedure_file'"
$ submit/noprint/keep/restart 'procedure_file'
$exit