Ad Widget

Collapse

Template linkage with macro

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tof233
    Member
    • Nov 2010
    • 94

    #1

    Template linkage with macro

    Hello,

    I am creating a template to monitor Hard Drives performances but I'm facing the problem that there could be more than one disk on a computer.
    So I created 1 template:
    Template_Linux_Disk
    with items : disk_stats[{$DEVICE},await] ...


    Then I created 2 templates linked to the first one with just 1 macro :
    Template_Linux_Disk_SDA
    {$DEVICE}=sda
    Template_Linux_Disk_SDB
    {$DEVICE}=sdb


    The problem I have is when I try to link Template_Linux_Disk_SDA and Template_Linux_Disk_SDB to an host:
    Template with item key [disk_stats[{$DEVICE},await]] already linked to host
    Template with application [Disk] already linked to host


    Maybe I should try another trick but I haven't found.
    Does anyone has an idea about how I could solve it?
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    You can't. We've hit the same problem here.

    I've gone through exported XML and renamed (using your example) DEVICE to DEVICE2 in the second template and then everything worked fine.

    Perhaps they'll come up with a way of making this work, but for now it looks to zabbix as though you have two items which are identical. I don't know if they can evaluate template and host macros before determining if there is an item collision, but it's perhaps best for performance if they are not for now.

    Comment

    Working...