[ZBXNEXT-3005] introduce macros for special return values of trigger functions Created: 2015 Oct 09  Updated: 2015 Oct 09

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 3.0.0alpha3
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Aleksandrs Saveljevs Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: functions, macros, prediction
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.


Generated at Wed Apr 24 03:07:36 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.