Skip navigation
878 Views 2 Replies Latest reply: Jun 16, 2012 1:00 PM by lweidig RSS
lweidig Rank: White Belt 9 posts since
May 19, 2007
Currently Being Moderated

Jun 13, 2012 4:41 PM

Templates - Mix-In or Override?

This is not really a technical Zenoss question, but rather a best practices one and I expect there will be different arguments.  We are trying to decide if inside the /Devices tree we are better off overriding the Device monitoring template at various levels or if we should just create a number of "mix-in" templates and apply them where needed.  Here are what I see as the pro/con of each:

 

Override Device Template

    Pro - Simple and keeps number of templates at a minimum

   Con - If we later decide to add something high up in the tree it requires adding that to every lower level Device template that was overridden

 

Mix-In Templates

   Pro - Modular

   Con - Lots of templates to look at / filter and decide what applies

 

The "stock" device template simply monitors uptime.  Ok, say I now override my router branch with all sorts of nice things to collect / monitor in regards to routers.  Then I go into Cisco and override that device with some stuff, Juniper with some other stuff.  Now we decide that it would be nice to ifNumber for all devices (yes, this is just an example).  I need to add it at the top of the tree, routers, cisco and juniper for eaverything to grab it.  I have not been able to see any automatic way to make this happen.  This alone makes ne not want to override templates.

 

With mix-in I would just have a Router template, Cisco Template, Juniper Template,... and add ALL of them at the root.  Then I just add them in to each branch as appropriate.  Now when I change Device it propogates to everything.  Seems to me this is the way to go. 

 

Other questions would be is if there are any performance implications of one over the other?    Maybe I am thinking about this all wrong.  That is what I am hoping to have answered. 

 

All feedback / comments appreciated.

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    1. Jun 16, 2012 11:08 AM (in response to lweidig)
    Re: Templates - Mix-In or Override?

    I generally use some and some but, especially if you are not very accustomed to SNMP management, then It is a bit of an art knowing what should be in generic templates that gets inherited by devices in subclasses and what should go in device-specific templates to follow your mix-in pattern.

     

    There are a few obvious things like stuff that is delivered by standard mibs, such as MIb-2, (eg sysUpTime) is a good candidate for a global-ish template whereas stuff from enterprise-specific MIBs should go into a lower-level template, potentially one of your "mix-in" templates.

    Cheers,

    Jane

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points