Ad Widget

Collapse

Weird behavior in calculated items...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • steev
    Member
    • Aug 2010
    • 38

    #1

    Weird behavior in calculated items...

    I have 2 calculated items that work. Their formulas are:

    last("grpsum[\"Central\",\"vfs.fs.size[/repository,free]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository2,free]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository3,free]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository4,free]\",\"last\",\"0\"]")

    and

    last("grpsum[\"Central\",\"vfs.fs.size[/repository,used]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository2,used]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository3,used]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository4,used]\",\"last\",\"0\"]")

    these both work fine. If clone one of them and try to add up the groupsums of vfs.fs.size[/repo(2,3,4, etc),total] like this:

    last("grpsum[\"Central\",\"vfs.fs.size[/repository,total]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository2,total]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository3,total]\",\"last\",\"0\"]")+last("grpsum[\"Central\",\"vfs.fs.size[/repository4,total]\",\"last\",\"0\"]")

    then it fails with the error:

    [CPCentral:vfs.fs.cluster.repos.total] error: Cannot evaluate function [last()]: item [CPCentral:grpsum["Central","vfs.fs.size[/repository,total]","last","0"]] not found


    I'm running 1.8.4 and thoroughly confused.
  • steev
    Member
    • Aug 2010
    • 38

    #2
    Solution....

    I had not yet created the other "vfs.fs.size[/repository*,total]" items yet for Zabbix to add up... if you want to calculate a value from other items, the items referenced in the formula must exist first.

    Comment

    Working...