Administration Guide

  • Docs Home
  • Community Home

2. Templates

Zenoss stores performance configuration data in RRDTemplates (generally referred to as templates). Templates contain other objects that define where and how to obtain performance data, thresholds for that data, and data graphs.

You can define a template anywhere in the device class hierarchy, or on an individual device.

Templates are divided among three types: device, component, and interface.

2.1. Template Binding

The determination of which templates apply to what objects is called binding. Templates are bound in different ways, depending on the objects to which they are bound.

2.1.1. Device Templates

Device templates are applied to devices, one to each device. Zenoss employs a single rule to bind device templates to devices: the value of the zDeviceTemplates property. For most device classes, this is "Device."

Common device templates are:

  • Device

  • MySQL, Apache

  • Active Directory, MSExchangeIS, MSSQLServer, IIS

For the Server/Linux/MySQL device class, the zDeviceTemplates property might contain, for example, "Device" and "MySQL." Zenoss would collect CPU and memory information by using the Device template, and MySQL-specific metrics by using the MySQL template.

2.1.2. Component Templates

Component templates are named exactly according to the name of the underlying class that represents a component. For example, the FileSystem template is applied to file systems. Component templates can be applied multiple times to each device, depending on how many of the device's components match the template. zProperties do not control the application of component templates.

Note

Component templates should not be manually bound.

Common component templates are:

  • FileSystem, HardDisk, IPService, OSProcess, WinService

  • Fan, PowerSupply, TemperatureSensor

  • LTMVirtualServer, VPNTunnel

2.1.3. Interface Templates

Interface templates are applied to network interfaces by using a special type of binding. Instead of using the name of the underlying class, Zenoss looks for a template with the same name as the interface type. You can find this type in the details information for any network interface (from the OS tab of its containing device).

If Zenoss cannot locate a template that matches the interface type, then it uses the ethernetCsmacd template.

2.1.4. Defining Templates in the Device Hierarchy

You add a new device at /Devices/Server/Linux/Example1Server. You have not edited the value of its zDeviceTemplates property, so it inherits the value of "Device" from the root device class (/Devices). Zenoss looks to see if there is a template named Device defined on Example1Server itself. There is not, so it checks /Devices/Server/Linux. There is a template named Device defined for that device class, so that template is used for Example1Server. (There also is a template named Device defined at the root level (/Devices), but Zenoss does not use this one because the template at /Devices/Server/Linux overrides it.)

2.1.5. Applying Templates to Multiple Areas in the Device Hierarchy

You want to perform specific monitoring of servers running a certain Web application, but those servers are spread across several different device classes. You create a template at /Devices called WebApplication with the appropriate data sources, thresholds and graphs. You then append the name "WebApplication" to the zDeviceTemplates zProperty for the devices classes, the individual devices running this Web application, or both.