Softpanorama
May the source be with you, but remember the KISS principle ;-)

Contents Bulletin Scripting in shell and Perl Network troubleshooting History Humor

Patterns in HP  operations manager

News Policies Recommended Links Regular Expressions -- the most popular nonprocedural language Policy variables
Deduplication Automatic acknowledgement Actions Message Keys  
Condition Matching Optimization Event Correlation Correlation Composer Humor Etc

Note: HP renamed the product called now HP operations manager way too many times. Also it is very inconsistent with using abbreviations. Here we will assume that the term "HP Operations manager" and abbreviations HPOM, OMU, and OVO  mean the same thing :-)

HPOM tries to reinvent the cycled reinventing regular expression of "patterns" and as always in such cases the result are horrible. They provide a tiny subset of Perl regular expression that is difficult to learn, difficult to use and that is providing limited opportunities for matching text patterns.

They call them proprietary pseudo-regex language "patterns" with their own proprietary syntax and semantic of key elements is far from being slick or interesting other that that it in pervert way reflects thinking patterns (or lack thereof) of HPOM architects. It's pretty sick implementation,  if you ask me :-).

One unique feature of HPOM is that regex simultaneously can contain the name of the local variable to which the value of regex will be assigned. For example, pattern 

<#.threshold>  

in Perl can be programmed something like

$MSG_TEXT =~ /(\d+)/; 
$threshold = $1; 

After that you can use a user defined variable somewhere else in condition (they are local to the condition).

Pattern can be more complex/perverted. For example:

<<#.uid> -eq 0> 
You can experiment with this perverted regular expression style engine using the command like utility opcpat. The command has the ability to not only test the pattern but to provide feedback on the contents of any variables created by the pattern. The command is located in the /opt/OV/bin/OpC/utils directory which is not normally in the administrator's PATH variable. The command can be in two ways:

HPOM regex use several special characters:

The key elements of HPOM pattern language as following (by default matching is case sensitive: 

  HPOM patterns or regex allow the setting of variables within the pattern. The variable is specified after dot. For example:

 <*.vat> or <#.vat> or <@.var>

Case sensitivity and separators normally defined as part of a condition and can be changes if the need arise to have a different definitely then default. The default for each of these elements is:

Numeric Range Operators

The basic pattern for constructing complex expressions with these operators, is: <number--operator--[sub-pattern]--operator--number> The sub-pattern can be a simple numeric operator, for instance <#> or <2#>. Such a simple operator does not require delimiting brackets. Alternatively, it may be a complex sub-pattern, using delimiting brackets: <120 -gt [<#>1] -gt 20> It is also possible to construct a pattern by using only one operator: Error <<#> -eq 1004>

The 6 Numeric Range Operators:

Less Than or Equal To (-le) Operator

Example of use: <<#> -le 45> This pattern matches all messages containing a number that is less than or equal to 45. For example, the following message would be matched:

ATTENTION: Error 40 has occurred

Note that the number 45 in the pattern is a true numeric value and not a string. Numbers higher than 45, for instance, 4545 will not be matched even if they contain the combination, 45. Less Than (-lt) Operator

Example of use: <15 -lt <2#> -le 87>

This pattern matches any message in which the first two digits of a number are within the range 16-87. For instance, the message: Error Message 3299 would be matched.

The string: Error Message 9932 would not be matched. Greater Than or Equal To (-ge) Operator

Example of use: ^ERROR_<57 -ge <#.err>>

This pattern matches any text starting with the ERROR_ string immediately followed by a number less than or equal to 57. For example, the following message would be matched:

ERROR_34: processing stopped

The string 34 would be assigned to the variable, err.

Note the use of the caret (^) expression anchor.

Greater Than (-gt) Operator

Example of use:

<120 -gt [<#>1] -gt 20>

Matches all numbers between 21 and 119 that have 1 as their last digit. For instance, messages containing the following numbers would be matched: 21, 31, 41...101... 111, and so on.

Second example: Temperature <*> <@.plant>: <<#> -gt 100> F$

This pattern matches strings such as: ``Actual Temperature in Building A: 128 F''. The letter A would be assigned to the variable, plant. Note the use of the $ expression anchor. A “greater than” operator is also referred to as an Open Interval. Using “greater than equal to” operators creates a

Closed Interval.

Equal To (-eq) Operator

Example of use:

Error <<#> -eq 1004>

This pattern matches any message containing the string Error followed by the sequence of digits, 1004. For example, the following message would be matched by this pattern:

Warning: Error 1004 has occurred

However, Error 10041 would not be matched by this pattern.

Not Equal To (-ne) Operator

Example of use:

WARNING <<#> -ne 107>

This pattern matches any message containing the string WARNING followed by a blank and any sequence of one or more digits, except 107. For example, the following message would be matched: Application Enterprise (94/12/45 14:03): WARNING 3877

To Insert Expression Symbols in Pattern-matching Expressions

Any time you work with pattern matching, you can use the left and right mouse buttons to insert expression symbols.

To insert expression symbols, follow these steps:

  1. Select the text you want to replace with an expression.
  2. Right-click the selected text for a list of replacement symbol choices.
  3. Select the symbol from the list.
Note that you cannot use this feature to supply variable names, which must be typed into the expression individually.

Variables and Parameters of Pattern-matching Expressions

Any matched string can be assigned to a variable, which can then be used to recompose messages or be used as a parameter for action calls. To define a parameter, add .parametername before the closing bracket. The ^errno: <#.number> - <*.error_text> pattern matches a message such as the following:

errno: 125 - device does not exist and assigns 125 to number and device does not exist to error_text. Variable names may only contain alphanumeric characters as well as underscores (_) and hyphens (-). The following syntax rules apply:

(Letter | '_'){ Letter | Digit | '_' | '-' }

In the syntax above, Letter allows letters and ideographic characters from all alphabets, and Digit allows digit characters from all alphabets. Rules Used by HPOM to Assign Strings to Variables In matching the pattern <*.var1><*.var2> against the string abcdef, it is not immediately clear which substring of the input string will be assigned to each variable. For example, it is possible to assign an empty string to var1 and the whole input string to var2, as well as assigning a to var1 and bcdef to var2, and so on.

The pattern-matching algorithm always scans both the input line and the pattern definition (including alternative expressions) from left to right. Expressions such as <*> are assigned as few characters as possible. In contrast, expressions such as <#>, <@>, and <_> are assigned as many characters as possible. The variable will therefore be assigned an empty string in the above example. For example, to match the this is error 100: big bug input string, use the following pattern: error<#.errnumber>:<*.errtext>

In this example:

For performance and pattern readability purposes, you can specify a delimiting substring between two expressions. In the above example, a colon (:) is used to delimit <#> and <*>.

Matching <@.word><#.num> against abc123 assigns abc12 to word and 3 to num, as digits are permitted for both <#> and <@>, and the left expression takes as many characters as possible.

Patterns without expression anchoring can match any substring within the input line. For example, the this is number<#.num> pattern is treated in the same way as the following: <*>this is number<#.num><*>

Using Sub-patterns to Assign Strings to Variables

In addition to being able to use a single operator, such as a star (*) or a number sign (#), to assign a string to a variable, you can also build up a complex sub-pattern composed of a number of operators, according to the following pattern: <[sub-pattern].var>.

For example: <[<@>file.tmp].fname>

Note that in the example above, the period (.) between file and tmp matches a similar dot character, while the dot between “]” and “fname” is necessary syntax. This pattern would match a string such as Logfile.tmp and assigns the complete string to fname.

Other examples of sub-patterns are:

<[Error|Warning].sev>

<[Error[<#.n><*.msg>]].complete>

In the first example above, any line with either the word Error or the word Warning is assigned to the variable, sev. In the second example, any line containing the word Error has the error number assigned to the variable, n, and any further text assigned to msg. Finally, both number and text are assigned to complete.

In most cases, pattern matching involves simply scanning for a specific string in a message. However, some mathematical operators are available to enhance the precision of the search. For example, if you type ERROR along with the TEXT keyword in MSGCONDITIONS block of the policy body, only message text containing the string “ERROR” (in any position) is matched.

Similarly, if you want to match text that does not contain a specific string (for example, “WARNING”), you might enter the following: <![WARNING]>

In this example, you use the not operator (!), together with the angle brackets that must enclose all operators, and the square brackets that isolate sub-patterns. Because messages that match a suppress condition are excluded from HPOM, you do not need to reformat messages or specify actions for matching messages.

If you used the ICASE keyword in your policy body, any combination of uppercase and lowercase characters composing the word, “warning”, can be matched. Here are a few examples of the many conditions you can use in the HPOM pattern-matching language:


Top updates

Softpanorama Switchboard
Softpanorama Search


Old News

HP OpenView VantagePoint Operations for Sun Solaris Software ...

Pattern-matching Expressions <S> and <nS>

The pattern-matching expressions <S> and <nS> have been replaced with the new expressions <_> and <n_>. <_> matches a sequence of one or more separator characters.

<n_> matches a string of n separators. For compatibility reasons, the expressions <S> and <nS> still work in VPO version A.07.00 but may be obsoleted with future releases.

Operations Manager Administrator's Reference OML9.01_Linux_AdminRef.pdf

NODEPATTERN Pattern matching can be used to match nodes.

Note that pattern-matching is case insensitive. Two match types are possible:

• IPPATTERN:

Pattern matching using IP address of a node.

Example: NODEPATTERN IPPATTERN

"10.1.<*>".

• NAMEPATTERN:

Pattern matching using the node name.

Example: NODEPATTERN NAMEPATTERN "testnode.<*>".

APPLICATION Application name.

MSGGRP Message group name. OBJECT Object name. MSGTYPE Description of the message type.

MSGCONDTYPE Message condition type: • Match: Condition is true if the specified attributes are matched. • Suppress: Condition is true if the specified attributes are not matched. TEXT A string containing all or part of the message text. Pattern-matching may be used. Example: TEXT "^Path: /[dir1|dir2]<_>[dir3|dir4]" SEPARATORS "/"

SERVICE_NAME

A string containing the unique identifier of the service. Pattern-matching may be used. Example: SERVICE_NAME "Service<*> [A|B]" ICASE



Etc

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes.   If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. 

ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.  

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least


Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: August 05, 2013