Search code examples
zabbix

Zabbix. How use function as of parameter another function


Idea use computed property to get difference between first day of month and current. I use formula: last("prtMarkerSuppliesLevel.1.2") - last("prtMarkerSuppliesLevel.1.2", dayofmonth("prtMarkerSuppliesLevel.1.2") ) first part work properly, but then i use dayofmonth i get error

Cannot evaluate expression: unexpected token at ")".

What is wrong?


Solution

  • Answer from zabbix forum 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