Ad Widget

Collapse

Item already exists on "HOST", inherited from another template.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mpolitaev
    Member
    • Jun 2015
    • 32

    #1

    Item already exists on "HOST", inherited from another template.

    Hi to all!

    I have two templates that assigned on one HOST. In first template I would to create trigger that use item (vm.memory.size[total]) which provided by SECOND template. But template must be independent, and I would to have this item in FIRST template. But when I try create vm.memory.size[total] item on FIRST template see this error:

    Code:
    Created: Item "Total memory" on "FIRST TEMPLATE".
        Item "vm.memory.size[total]" already exists on "HOST", inherited from another template.
    How I can have item vm.memory.size[total] in both templates? And no have errors when they assigned to ONE host?
  • acropia
    Junior Member
    • Mar 2015
    • 26

    #2
    You can not have two different templates with the same item key attached to a single host. This something you want, and is not a bug or missing feature

    For this situation you can use nested templates. Then you can divide items based on their level.

    For example:
    1. OS Linux
    2. OS Linux - CentOS
    3. OS Linux - CentOS Linux 7


    The last template you attach to the host. Then you attach the second template to the third, and the first one to the second.

    Such an item you want to configure (vm.memory.size), you now can configure inside the 'highest level' template 'OS Linux'. That way, all hosts with that template (or any child templates) will get this item configured.

    Now you can use different templates on host, but have them all configured with (some) same items.

    Comment

    • mpolitaev
      Member
      • Jun 2015
      • 32

      #3
      I understand.

      Ok, and how I can write trigger on "OS Linux CentOS Linux 7" template which use item provided by "OS Linux" template?

      Code:
      {OS Linux:vm.memory.size[total].last(0)}>0
      So?

      Comment

      Working...