Ad Widget

Collapse

Zabbix. How use function as of parameter another function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Actimele
    Junior Member
    • Feb 2018
    • 2

    #1

    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?
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Hi,

    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 :



    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

    Comment

    • Actimele
      Junior Member
      • Feb 2018
      • 2

      #3
      Thx for reply

      Comment

      Working...