扎比克斯。如何使用函数作为参数另一个函数
Zabbix. How use function as of parameter another function
想法使用计算 属性 来获取当月第一天和当前日期之间的差异。
我使用公式:
last("prtMarkerSuppliesLevel.1.2") - last("prtMarkerSuppliesLevel.1.2", dayofmonth("prtMarkerSuppliesLevel.1.2") )
第一部分工作正常,但后来我使用 dayofmonth 我得到错误
Cannot evaluate expression: unexpected token at ")".
怎么了?
来自zabbix论坛的回答thread link
Sorry, but you can not use last function in such way, it does not
support another last function as argument
the possible workaround - just create an item with scheduled interval
:
https://www.zabbix.com/documentation...stom_intervals
interval will be something like this: Code: md1h0m0 every 1st day of
each month at 0:00 This value will be collected only once a month and
will represent your prtMarkerSuppliesLevel at the begining of the
month.
then you can use last(your.current.item) - last(scheduled.item)
Regards, Kaspars
想法使用计算 属性 来获取当月第一天和当前日期之间的差异。
我使用公式:
last("prtMarkerSuppliesLevel.1.2") - last("prtMarkerSuppliesLevel.1.2", dayofmonth("prtMarkerSuppliesLevel.1.2") )
第一部分工作正常,但后来我使用 dayofmonth 我得到错误
Cannot evaluate expression: unexpected token at ")".
怎么了?
来自zabbix论坛的回答thread link
Sorry, but you can not use last function in such way, it does not support another last function as argument
the possible workaround - just create an item with scheduled interval :
https://www.zabbix.com/documentation...stom_intervals
interval will be something like this: Code: md1h0m0 every 1st day of each month at 0:00 This value will be collected only once a month and will represent your prtMarkerSuppliesLevel at the begining of the month.
then you can use last(your.current.item) - last(scheduled.item)
Regards, Kaspars