-
Problem report
-
Resolution: Unresolved
-
Minor
-
6.0.34, 7.0.4
-
Prev.Sprint, S24-W44/45
Problem description: In case if a host has both macro (for example {$TEST}) and macro with context (like {$TEST:regex:x}) and then this macro is used in trigger expression, then it is possible that the context macro will be resolved with plain macro value in the event details form. To observe the problem, please follow the steps below.
Steps to reproduce:
- Create host with the following macros:
- {$TEST} =>33
- {$TEST:regex:x} => 15
- Create a trapper item with key "trap" on this host
- Create a trigger that will use the TEST macro in the trigger expression and trigger name:
trigger {$TEST:regex:abc} last(/<host>/trap)>{$TEST:regex:abc}
- Send a value to the trapper item, that would be higher then the value of the context macro but lower than the value of the plain user macro, for example 17
- Go to Monitoring => Problems and make sure that the problem isn't created
- Send a value to the trapper item, that would be higher then the value of the plain user macro, for example 34
- Go to Monitoring => Problems and make sure that the problem is created
- Open event details of the created problem and check the "Problem name" field
Expected:
The problem should have been created with the item value "17".
The "Problem name" field contains the value of the macro {$TEST}, even though the macro {$TEST:regex:x} should have been resolved when the problem was created, since in the trigger name and trigger expression, the macro contains the context "regex:abc" with the character "x." Please note that the reserved "regex:" prefix should be recognized as such only in the macro configuration and not in the places where it is used.