Ad Widget

Collapse

LLD macro in javascript preprocessing for an item prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jbdenis
    Junior Member
    • Apr 2020
    • 4

    #1

    LLD macro in javascript preprocessing for an item prototype

    Hello everybody,

    I'm stuck with Zabbix 5.0 at the moment, and I'm wondering if there is a way to use LLD macro inside javascript preprocessing step for an item prototype. The documentation mentions the possible use of user macros, but LLD macros does not seem to work.

    For example, in the context of vfs.dev.discovery item, if I create an item prototype with this preprocessing javascript code, the item value will literally be {$DEVNAME}, without resolution.
    Code:
    function (value) {
         return '{$DEVNAME}';
    }
    Do you know if that's possible or if it is a limitation of 5.0 ?

    Thank you for you help.
  • jbdenis
    Junior Member
    • Apr 2020
    • 4

    #2
    My mistake was in:

    Code:
    return '{$DEVNAME}';
    It should be:

    Code:
    return '{#DEVNAME}';
    Problem solved.

    Comment

    Working...