Ad Widget

Collapse

User macros per template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mario.almeida
    Member
    • Nov 2008
    • 44

    #1

    User macros per template

    Hi All,

    How can I have User macros (UM) per template.

    The macro should be unique per template and not global.

    eg:
    Create 2 templates as below.

    Template-00
    UM: {$USER}=aares00
    UM: {$HTTP_PORT}=8080
    UM: {$JNP_PORT}=1099

    Template-01
    UM: {$USER}=aares01
    UM: {$HTTP_PORT}=8180
    UM: {$JNP_PORT}=1199

    Create a host name web2

    Add Template-00 and Tempalte-01 to host web2

    Go to template-00 and add an Item with a key having {$USER} in it.

    Up to here successful.

    Problem 1:-
    Got to Template-01 and add an item with a key having {$USER}.

    Error message
    An item with the Key [key.func[{$USER}]] already exists for host <hostname>

    Problem 2:-
    Go to Template-00 add a trigger and in the name put {$USER}
    Go to Template-01 add a trigger and in the name put {$USER}

    When you go to Monitoring->Triggers and in the display list under names you will find the 1st UM name for both the triggers.

    Is it possible to have UM per template?
    If not then when saving the next template it should alert that UM with this name already exist.
  • mario.almeida
    Member
    • Nov 2008
    • 44

    #2
    Hi All,

    Any Idea?

    Comment

    • DeDA
      Junior Member
      • Mar 2011
      • 5

      #3
      I have the issue like described above.

      I've created 2 templates:

      Template-1:
      Macro: {$NAME} => ONE
      Item key: get_cpu_load[{$NAME}]

      Template-2:
      Macro: {$NAME} => TWO
      Item key: get_mem_load[{$NAME}]

      Template-3:
      Linked with: Template-1, Template-2

      Host-1:
      Linked with: Template-3.

      Issue description:
      User macro {$NAME} under the host "Host-1" is equal to "ONE" (user macro from Template-1) for data item "get_mem_load", that's incorrect.

      Any ideas to resolve that?

      Comment

      Working...