I'm trying to do something like this in a template:
but doing so results in this error:
Doc on calculated items is a little muddy -- doc for calculated items says:
I am using {$OTHERHOST} as part of the parameter to the function last() -- but, in the context of the hostname which I guess is why I get the error...
Anyone have any ideas how I can make the hostname in a calculated item be a "variable" (presumably user macro, but open to other creative ideas) in a template?
What I'm trying to do is calculate an item on a virtual host based on values from a number of "underlying" actual hosts. I don't want to put the underlying hosts in a group and use grpsum() because I would have over 200 such groups (and growing) -- and I think I'd have the same problem anyway as the group name would need to be a variable (macro)...
Thanks in advance for any ideas!
Code:
last("{$OTHERHOST}:web.test.fail[webapp]")
Cannot evaluate function "last()": item "zabtest:{$OTHERHOST}:web.test.fail[webapp]" does not exist.
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.
Anyone have any ideas how I can make the hostname in a calculated item be a "variable" (presumably user macro, but open to other creative ideas) in a template?
What I'm trying to do is calculate an item on a virtual host based on values from a number of "underlying" actual hosts. I don't want to put the underlying hosts in a group and use grpsum() because I would have over 200 such groups (and growing) -- and I think I'd have the same problem anyway as the group name would need to be a variable (macro)...
Thanks in advance for any ideas!
Comment