Ad Widget

Collapse

Item prototype Calculated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cedric.marcoux
    Junior Member
    • May 2018
    • 10

    #1

    Item prototype Calculated

    Hello,

    i'm trying to evolve the VMware ESX Standalone Template ans I have difficulties to create an item prototype calculated on Zabbix 3.4.7

    Here are the working values:
    The Discovery Rules:
    Name: Datastore discovery
    Type: Simple check
    Key:
    vmware.hv.datastore.discovery[{$URL},{$UUID}]
    Working: Yes

    The 2 items needed for my item prototype calculation:

    Name: Free space on datastore $3
    Type: Simple check
    Key:
    Code:
    vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE},free]
    Working: Yes

    Name: Total size of datastore $3
    Type: Simple check
    Key:
    Code:
    vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE}]
    Working: Yes

    My calculated item prototype that is not working:

    Name: Used space on datastore $3
    Type: Calculated
    Key:
    Code:
    vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE}]
    Working: No
    Formula:
    Code:
    last("vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE}]")-last("vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE},free]")
    Errors: Cannot create item: Invalid first parameter "vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE}"
    I have try several combination but cannot find the way to write the good formula...

    ​​​​​​​Any help is welcome
    Last edited by cedric.marcoux; 08-05-2018, 10:27.
  • cedric.marcoux
    Junior Member
    • May 2018
    • 10

    #2
    Hello, finally found myself, the trick was to add a ,0 to the last function

    Code:
    last("vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE}]",0)-last("vmware.hv.datastore.size[{$URL},{$UUID},{#DATASTORE},free]",0)

    Comment

    Working...