[ZBXNEXT-1719] Allow to use temporal trigger functions without item context Created: 2013 Apr 23 Updated: 2021 May 17 Resolved: 2021 May 17 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F), Server (S) |
Affects Version/s: | 2.0.5 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Trivial |
Reporter: | Volker Fröhlich | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 14 |
Labels: | expressions, simplification, syntax, trigger | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Trigger functions always require an item to attach to. In the case of time(), this bloats the expression, while actually there is no connection to the item at all: {host:item.time(0)} > 010000 & {host:item.time(0)} < 020000 time() > 010000 & time() < 020000 On the other hand, that would allow for trigger expressions without an item reference at all. I suppose that'd break everything. |
Comments |
Comment by richlv [ 2013 Apr 23 ] |
i thought there was an issue about this already, but i can't find it. in any case, validation would simply check that at least one item is referenced and not allow saving triggers if not. it would be similar how one could try to create a trigger that would only include a user macro. |
Comment by Oleksii Zagorskyi [ 2013 Jul 02 ] |
Probably richlv meant <richlv> no, the discussion i had in mind was a couple years old at least |
Comment by Marc [ 2014 Mar 15 ] |
When considered for implementation (what I appreciate) keep in mind value resolution by macros (e.g. {ITEM.VALUE<1-9>}) |
Comment by Raymond Kuiper [ 2014 Sep 19 ] |
Kind of related: ZBXNEXT-2469 |
Comment by richlv [ 2017 Feb 08 ] |
|
Comment by Евланов Александр Викторович [ 2019 Feb 07 ] |
>it would be similar how one could try to create a trigger that would only include a user macro. Such trigger (based on now() or time(), for example) can exists and can be potentially useful. All problems lying on the database level where each trigger must be connected to some item. |
Comment by Alexei Vladishev [ 2021 May 17 ] |
It has been implemented in Zabbix 5.4. Now you can use time and date functions without references to any item, see https://www.zabbix.com/documentation/5.4/manual/appendix/functions/time |