-
Change Request
-
Resolution: Unresolved
-
Minor
-
None
-
3.0.0alpha3
Feature request ZBXNEXT-922 introduced support for forecast() and timeleft() trigger functions. These functions are a bit different from other functions in that they return error codes (-1) and special values designated as infinities (-999999999999.9999, 999999999999.9999). The value of -1 is not only an error code, but a valid return value of forecast() function. Infinities are simple to mistype.
It is therefore suggested to introduce special macros that one would use in trigger expressions, similar to {TRIGGER.VALUE}, for these error codes and infinities. For instance, using {FUNCTION.ERROR} instead of -1 would allow to document the intent and using {FUNCTION.INFINITY} instead of 999999999999.9999 would protect against typos.