Ad Widget

Collapse

LLD - how reference dynamic key in item prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramoneastral
    Member
    • Feb 2017
    • 33

    #1

    LLD - how reference dynamic key in item prototype

    hi all,

    maybe i am just mixing up escape characters et al. but

    i have ldd with host prototype and that works fine .
    with a second macro in host prototype i am able to separate these hosts . namely fileserver - root folder - subfolders ...

    now i created an item prototype to do aggregation of these subfolders - works also fine .

    now i want to do some calculations on this aggregated item . how do i put in the aggregate item into the calc item ?

    aggregate item : grpsum["tech/AZUREFILES/{#SHAREPARTITION}","allsum",last]
    calculate item : forecast("what-goes-here ????",{$6MGROWTHHIST2},,180d)

    maybe: forecast("grpsum["tech/AZUREFILES/{#SHAREPARTITION}","allsum",last]",{$6MGROWTHHIST2},,180d) ???
    this does not work for me ,
    what am i missing ?
  • steeladept
    Member
    • Sep 2018
    • 69

    #2
    This is above me, so I may be way off here; but it looks to me like the forecast you are trying to setup has 3 parameters but it wants 4. What should go between the 2 commas? Or should one be removed?

    Also, and perhaps more likely to your issue (now that I look closer at it), you are using double quotes everywhere, which means in the solution you think should work, the first field is <grpsum[> not <grpsum["tech/AZUREFILES/{#SHAREPARTITION}","allsum",last]>. Perhaps try enclosing it in single quotes instead of double-quotes. Or if you can assign it as a variable and use the variable. In some way, you need to differentiate the grouping so it knows the whole thing is the first parameter and not break it up - especially since it contains commas too.

    Comment

    • ramoneastral
      Member
      • Feb 2017
      • 33

      #3
      my fault ... RTFM calculated items : User macros in the formula will be expanded if used to reference a function parameter or a constant. User macros will NOT be expanded if referencing a function, host name, >>item key<<, item key parameter or operator. i created a calculated item and disabled it, when needed i just clone the item and change the needed itemkey - escaping with backslash...
      thanks for listening

      Comment

      Working...