[PATCH] Allow event matching based on relational operators (lt, gt, ...)

Description

When matching events in eventconf.xml, you can match varbind values. This can be matched by absolute value or using a regex, but you can't match "if the varbind value is above 50" or "if the varbind value is below 3.4".

This patch allows this.

syntax is as follows :

<varbindoid>
<vboid>.1.3</vboid>
<vbvalue>+gt:50</vbvalue>
<vbvalue>+lt:20.2</vbvalue>
</varbindoid>

If the value starts with plus symbol , then this is a relational match. After that, specify the operator (less than, greater than, ...). The two-letter convention used is from Perl or Bash. Then a colon as a separator, then the value you want to compare to (as a Float).

The example above reads as : "match if varbind OID .1.3 is greater than 50 or lesser than 20.2". Note that it uses the varbindoid contruct I suggest in Enhancement NMS-4377 .

I hope you find these enhancements useful and merge them.

Patch is based on latest master.

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Seth Leger August 29, 2011 at 10:34 AM

Deferring to 1.11.

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created February 16, 2011 at 4:30 AM
Updated September 21, 2021 at 9:15 PM