[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".
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.
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.