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

Conference csc32::consolemanager

Title:POLYCENTER Console Manager
Notice:Kits, Scans, Docs on CSC32:: as PCM$KITS:,PCM$DOCS:, PCM$SCANS:
Moderator:CSC32::BUTTERWORTH
Created:Thu Aug 06 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1541
Total number of notes:6564

457.0. "Regular expression question" by EEMELI::OJUSSILA (Olli Jussila, OMS Finland) Mon Oct 31 1994 09:57

    
    
    I tried to make event with regular expression to catch
    AS400 errorlog entry for disk error event

    text is
    31xx              Permanent                     23
      ^^              ^^^^^^^^^                      ^^
     hexdesimal       This could be                   error count
		      also
		      Temporary
		      Statistics

	31xx is critical error code for disks.

	I tried to create one event for this with following
	regular expression. I know it is no exact match but last nigth
	we got lot of false alarms.
	" it seems that match happend with line
                                                   FSAS01    31.10.94 05:03:58

        it leagal expression?
	
	
	Can I use ^ to include begin of line
	^    31 -> ^

	Is it possible to have several experessions for one event?

	Is this leagal [0-9,A-F]?

Event Name      = as400_diskerr1
    Information = as400 disk error
    Class       = as400_critical
    Subsystem   = as400_disk
    Text        =     31[0-F][0-F] * [P,S,T][e,t][a,m,r][m,p,t]*        [0-9]*^
    Text match  = Regular Expression (token match) 
    Start       = 0
    Count       = 1
    Priority    = Critical
    
                           
T.RTitleUserPersonal
Name
DateLines
457.1OPG::PHILIPAnd through the square window...Mon Oct 31 1994 11:4529
Ollie,

  Exactly which text triggered the false alarms?

  I just tried this with my version of your regular expression and it
  worked OK for me.

  My version is...

#31[0-9,A-F][0-9,A-F]#[P,S,T]*#[0-9]*^

  I simplified this by not doing the extra character checks on "Permanent,
  Temporary and Statistics" although I think what you were doing is
  entirely legal.

  Note the use of the # character for whitespaceand yes [0-9,A-F] is
  legal, in fact it is necessary to achieve what you want, that is
  detect hex values. Also, I havnt tried it in your case, but the ^
  character can be used for match on start of line, doing this would
  convert my form of the regular expression to...

^#31[0-9,A-F][0-9,A-F]#[P,S,T]*#[0-9]*^

  Using my form of expression I could get this to generate an event on your
  " FSAS01    31.10.94 05:03:58" line although I didnt try with your
  expression.

Cheers,
Phil
457.2EEMELI::OJUSSILAOlli Jussila, OMS FinlandMon Oct 31 1994 14:587
    
    Phil,
    
    Thanks alot again. I'll try with your expressions. 
    
    -Olli
    
457.3More info. It almost worksEEMELI::OJUSSILAOlli Jussila, OMS FinlandTue Nov 01 1994 10:1192
    
    Well,
    
    When I used character cell interface lot of strange things happend.
    For example terminal server names changed to uppercase, some system
    names which were included in filters changed to upper case.
    Actually I had to restore my PORT file.
    
    But now PCM is working and here is some results for regular expression
    First there is 3 events and then there is output of action routine
    which echoed event name and text. As you see there is strings which
    should be there.
    
    For example for expression  #31[0-9,A-F][0-9,A-F]#Permanent#[0-9]*^
    
    when i send message "  31.F  Permanent    2"
    action was launched.
    but when message    "  311. Permanent   2"
    didn't launched action.
    
    As you seen the last match for numbers 0-9 didn't work either.
    
    I am running PCM V1.5 ECO 1 on ULTRIX V4.3A.
    
---
DELETE_EVENT:
    NAME: as400_diskerr1
END:

ADD_EVENT:
    NAME: as400_diskerr1
    INFO: as400 disk error
    TEXT: #31[0-9,A-F][0-9,A-F]#Permanent#[0-9]*^
    CLASS: as400_critical
    SUB_SYSTEM: as400
    REGULAR_EXPRESSION: Y
    START: 0
    COUNT: 1
    PRIORITY: CRITICAL
END:

DELETE_EVENT:
    NAME: as400_diskerr2
END:

ADD_EVENT:
    NAME: as400_diskerr2
    INFO: as400 disk error
    TEXT: #31[0-9,A-F][0-9,A-F]#Temporary#[0-9]*^
    CLASS: as400_critical
    SUB_SYSTEM: as400
    REGULAR_EXPRESSION: Y
    START: 2
    COUNT: 4
    PRIORITY: CRITICAL
END:

DELETE_EVENT:
    NAME: as400_diskerr3
END:

ADD_EVENT:
    NAME: as400_diskerr3
    INFO: as400 disk error
    TEXT: #31[0-9,A-F][0-9,A-F]#Statistics#[0-9]*^
    CLASS: as400_critical
    SUB_SYSTEM: as400
    REGULAR_EXPRESSION: Y
    START: 2
    COUNT: 4
    PRIORITY: CRITICAL
END:

Tue Nov  1 07:50:03 EET 1994 as400_diskerr1 310A   Permanent   9
Tue Nov  1 07:50:16 EET 1994 as400_diskerr1 31.A   Permanent   9
Tue Nov  1 07:51:28 EET 1994 as400_diskerr1 31.1   Permanent   9
Tue Nov  1 07:53:03 EET 1994 as400_diskerr1 31.1   Permanent   9
Tue Nov  1 07:53:15 EET 1994 as400_diskerr1 31.1   Permanent   9
Tue Nov  1 08:03:52 EET 1994 as400_diskerr1 3111   Permanent   9
Tue Nov  1 08:03:58 EET 1994 as400_diskerr1 3111   Permanent   9
Tue Nov  1 10:45:43 EET 1994 as400_diskerr1 31Z1 Permanent 1
Tue Nov  1 10:46:08 EET 1994 as400_diskerr1 3122    Permanent 1
Tue Nov  1 10:46:46 EET 1994 as400_diskerr2 3122   Temporary     sgsg 1
Tue Nov  1 10:50:15 EET 1994 as400_diskerr1 3122     Permanent  3     ss
Tue Nov  1 10:50:46 EET 1994 as400_diskerr1 31.2     Permanent  3
Tue Nov  1 10:51:13 EET 1994 as400_diskerr1 3112     Permanent  k
Tue Nov  1 10:51:17 EET 1994 as400_diskerr1 3112     Permanent  .
Tue Nov  1 10:52:42 EET 1994 as400_diskerr3 3112     Statistics 2
Tue Nov  1 10:56:51 EET 1994 as400_diskerr3 s  3112     Statistics 2
    
    
     
457.4OPG::PHILIPAnd through the square window...Tue Nov 01 1994 11:5211
Ollie,

  Yes, the character cell editor is full of problems, we would
  prefer that people use the DECwindows editor whenever possible.

  Anyway, back to your problem, I will take another look at what
  you are doing, but it will have to wait until next week I am
  afraid.

Cheers,
Phil
457.5EEMELI::OJUSSILAOlli Jussila, OMS FinlandTue Nov 15 1994 15:237
    
    Phil,
    
    	Have you had time to check this problem?
    
    	-Olli
    
457.6OPG::PHILIPAnd through the square window...Tue Nov 15 1994 16:0714
Ollie,

  I am real sorry, no I havnt, there is only me on the team
  at the moment, (Dave doesnt have the resource to look at
  this) the rest of the team (Simon) is on holiday, so,
  dealing with development for the next release, putting
  patches together and answering IPMT cases doesnt leave
  me a lot of time! Fortunately Simon returns at the end
  of the month, so we can get moving on this again.

  I havnt forgotten, it is on my to-do list.

Cheers,
Phil
457.7OPG::SIMONMon Nov 28 1994 12:184
Olli,
       Im back from leave and I shall have a look at this one today.

Cheers Simon..........
457.8Found a bug.OPG::SIMONTue Nov 29 1994 12:037
To the World,
             yes what Olli found was a bug. We have a fix he is going to check
for us. It was a bit of an obscure one that one.

The fix will be in the next ECO kit.

Cheers Simon......
457.9FixedEEMELI::OJUSSILAOlli Jussila, OMS FinlandThu Dec 01 1994 20:559
    
    To the PCM engineering,
    
    New image works as it should with reg exp. Now we and one customer gets
    correctly AS400 disk error events. 
    
    thanks,
	-Olli
    
457.10OPG::PHILIPAnd through the square window...Thu Dec 01 1994 21:0410
Olli,

  Thanks for your patience while we resolved this for you.

  This fix will be in everyones Christmas stocking (it will be part of the 
  MUP kit).

Cheers,
Phil