Skip to content

Monitoring templates

Resource Manager stores performance configuration data in 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.

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.

Device templates

Device templates are applied to devices, one to each device. The system 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. The system would collect CPU and memory information by using the Device template, and MySQL-specific metrics by using the MySQL template.

Binding a device template

To bind a device template to a device class or device:

  1. From the devices list, select a device class or device.

  2. On the Overview page, select Bind Templates from the Action menu.

    The Bind Templates dialog box appears.

    3. Move templates between the Available and Selected lists using the arrows. 4. Click Save.

Editing templates bound to a device

Select the templates that are bound to a device.

  1. From the main navigation menu, choose INFRASTRUCTURE.
  2. From the device list in the left pane, choose a device.
  3. Below the device list, click the context-sensitive actions menu and choose Bind Templates.
  4. From the list of available templates, move one or more templates to the selected list.

    5. Click Save.

Resetting bindings

Resetting template bindings removes all locally bound templates and uses the default template values. To reset bindings for a selected device or device class:

  1. Select Reset Bindings from the Action menu.

    The Reset Template Bindings dialog box appears.

  2. Click Reset Bindings to confirm the action.

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. Configuration properties do not control the application of component templates.

Do not manually bind component templates

Component template binding relies on the template name matching the component type. Manually binding component templates can have adverse effects on monitoring.

Common component templates are:

  • FileSystem, HardDisk, IPService, OSProcess, WinService
  • Fan, PowerSupply, TemperatureSensor
  • LTMVirtualServer, VPNTunnel

Do not rename component templates

Altering the name of a component template will prevent it from matching its associated component type.

For example, the FileSystem component template automatically applies to components of the FileSystem type. Renaming the template to FileSystem_Custom would prevent a match with FileSystem components.

Interface templates

Most interface templates are applied to network interfaces by using a special type of binding. Instead of using the name of the template's underlying target class, the system 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.

For these standard interfaces when Resource Manager cannot locate a template that matches the interface type, then it uses the ethernetCsmacd template.

Some vendors provide expanded monitoring capabilities on their interfaces. In some cases, ZenPacks provide custom templates specific to those types that can override this default behavior. A common example would be the Ethernet Interfaces interface type built to monitor these expanded capabilities for Cisco network interfaces. In this case the template's target class is used to bind the EthernetInterface template.

For more information about these expanded interface capabilities, refer to the Cisco Monitor ZenPack page.

Template management

Creating templates

You can create an empty template to customize to your needs. To create a new template:

  1. Select ADVANCED > MONITORING TEMPLATES.
  2. Click the "add a monitoring template" button ("plus" icon, lower-left corner). The "Add Template" dialog box appears.
  3. Provide a name, choose a template path, and then click Submit. The new template appears in the list.

Copying templates

You can create a template by overriding an existing template. To override a template:

  1. Navigate to the template you want to copy.
  2. From the Action menu, select Copy/Override Template. The Copy/Override dialog box appears.
  3. Select the bound template to override, and then click Submit. The copied template appears in the list of templates as locally defined.

Template names

Resource Manager determines the list of template names that apply to a device or component. For device components, the list is defined by the meta type of the component (for example, FileSystem, CPU, or HardDisk). For devices, the list is defined by the zDeviceTemplates configuration property.

After defining the list, Resource Manager locates templates that match the names on the list. For each name, it searches the device and then searches the device class hierarchy. Resource Manager uses the lowest template in the hierarchy that it can locate with the correct name, ignoring others of the same name that might exist further up the device class hierarchy.

Renaming templates

To rename an existing template:

  1. Select ADVANCED > MONITORING TEMPLATES.
  2. Expand the organizer containing the template to be renamed, and then the class containing the template.
  3. From the Action menu, select View and Edit Details. The Edit Template Details dialog box appears.
  4. Enter a new name in the Name field.
  5. Click Submit.

Template suffixes

Resource Manager supports special templates designed to supplant or supplement existing templates by adding the appropriate suffix to an existing template name.

You can use these templates to adjust device or component monitoring without altering the original templates, or without needing to create nested device classes, copy the original template, then alter the copies.

-replacement templates

A template that has the -replacement suffix replaces the original named template.

For example, if the /Server/Linux device class is using a bound template named Device, you might define a template named Device-replacement at the same device class. This template is then used in place of the original. The original device template does not require alteration or unbinding.

If you want to switch back to the original template, you can delete the replacement template if it's no longer needed, or rename it, for example, change Device-replacement to Device-replacement-backup.

-additional templates

A template that has the -additional suffix is used alongside the original named template.

For example, if the /Server/Microsoft device class has a filesystem component template named FileSystem, you might define a template named FileSystem-additional at the same device class. Devices in the /Server/Microsoft device class, and any sub-classes, monitor their filesystem components with both templates.

If you want to switch back to the original template, you can delete the replacement template if it's no longer needed, or rename it, for example, change FileSystem-additional to FileSystem-additional-backup).

Inheritance of suffixed templates

The normal rules of template inheritance apply to suffixed templates. A -replacement or -additional template apply to all devices at its defined device class, and any subclasses. If a template of the same name is defined closer to the path of a device or device class, then it overrides the suffixed template.

For example, suppose the /Server device class has templates named Device and Device-replacement, while the /Server/Linux class has a single template named Device. Devices in the /Server class will use the Device-replacement template defined at /Server, while devices in the /Server/Linux class will use the Device template defined at /Server/Linux.

Active template denoted with (*)
/Server
    Device
(*) Device-replacement
/Server/Linux
       (*) Device

Suffixed templates intended for devices don't need to be bound or listed in the zDeviceTemplates property. They only need to match the name of a template that is either bound or listed in zDeviceTemplates, followed by the appropriate suffix.

Suffixed templates intended for components must match the original template name, followed by the appropriate suffix.

Template contents

Monitoring templates determine how the system collects performance data for devices and device components. You can define monitoring templates for device classes and individual devices.

Templates comprise the following types of objects:

  • Data sources specify the exact data points to collect and the collection method to use.
  • Thresholds define expected bounds for collected data, and specify events to be created if the data does not match those bounds.
  • Graph definitions describe how to graph the collected data on the device or device components.

Before the system can collect performance data for a device or component, it must use the template binding process to determine which monitoring templates apply.

To view monitoring templates, from the main navigation menu, choose ADVANCED > Monitoring Templates.

Data sources

Data sources specify which data points the system collects and how to collect them. Each monitoring template comprises one or more data sources. The system provides the following built-in data source types. ZenPacks provide other data source types.

  • SNMP - Define data to be collected via SNMP by the ZenPerfSNMP daemon. You specify which SNMP OID to collect. (Many OIDs must end in .0.) Because SNMP data sources specify only one performance metric, they contain a single data point.

  • Command - Specify data to be collected by a shell command that is executed on the Resource Manager server or on a monitored device. The ZenCommand daemon processes COMMAND data sources. A COMMAND data source can return one or more performance metrics, and usually has one data point for each metric.

    Shell commands that are used with COMMAND data sources must return data that conforms to the NagiosĀ® plug-in output specification.

Adding a data source to a monitoring template

  1. From the navigation menu, choose ADVANCED > MONITORING TEMPLATES.
  2. In the tree view, select the monitoring template.
  3. In the Data Sources area, click Add.
  4. In the Add Data Source dialog box, enter a name for the data source, select the type, and then click Submit.
  5. Double-click the new data source.

    An Edit Data Source dialog box appears, specific to the data source type. For example, the following figure shows the Edit Data Source dialog box for a COMMAND data source.

  6. Enter or select values to define the data source.

    For example, the COMMAND data source type, Use SSH must be enabled. Otherwise, the commands only run locally on the collector that is assigned to the device to which the monitoring template is bound.

    In the Command Template field, enter the command to run. Note that any command that you enter in this field is first evaluated for TALES expressions. You might need to escape certain characters.

    For more information, see TALES expressions.

    For more information on COMMAND type data sources, see zencommand.

Data points

Data sources can return data for one or more performance metrics. Each metric that a data source retrieves is represented by a data point.

You can define data points for data sources with all source types except SNMP and VMware. Because these data source types each rely on a single data point for performance metrics, additional data point definition is unnecessary.

  1. From the navigation menu, choose ADVANCED > MONITORING TEMPLATES.
  2. In the Data Sources area, highlight the row that contains the datasource.
  3. From the action menu, choose Add Data Point.
  4. In the Add Data Point dialog box, enter a name for the data point, and then click Submit.

    Note: For COMMAND data points, enter the name that the shell command uses when returning data.

  5. Double-click the new data point and enter information or make selections to define it:

    • Name - Displays the name that you entered in the Add a New Data Point dialog box.
    • RRD Type - Review the following considerations, and then specify the data source type to use for storing data for this data point.

      The following considerations apply to COUNTER and DERIVE types

      • In previous releases, the system saved these rate data points by using their raw counters. Beginning with release 6.1.x, the system stores the actual rate value that is calculated at the collector daemon as it collects data. If a graph or API request for a COUNTER or DERIVE data point spans the date of the upgrade to 6.1.x, the system automatically queries the data correctly.
      • In graph legends, the minimum and maximum values are the actual calculated rates for the time period covered by the graph. However, in the graph, as you zoom out, increasing the time frame, minimum and maximum values are averaged; thus values might be different.
      • Instead of COUNTER, you could choose DERIVE and specify a minimum of 0. This approachcreates the same conditions as COUNTER, with one exception. Because COUNTER is a "smart"data type, it can wrap the data when the system reaches a maximum number of values. If a reporting loss occurs, the system (when looking at COUNTER values) might erroneously wrap the data, thereby creating an artificial spike in the system and statistical anomalies.
      • COUNTER - Saves the rate of value change over a step period (interval). COUNTER assumes that the value is always increasing (the difference between the current and the previous value is greater than 0). Example use: Traffic counters on a router.
      • DERIVE - Same as COUNTER, but allows negative values. Example use: To see the rate of change in free disk space on a server.
      • GAUGE - Does not save the rate of change, but saves the actual value. There are no divisions or calculations. Example use: To see memory consumption in a server.
      • ABSOLUTE - Saves the rate of change, but assumes that the previous value is set to 0. The difference between the current and the previous value always equals the current value.Thus, ABSOLUTE stores the current value, divided by the step interval.
    • Create Command - Enter an RRD expression that is used to create the database for this data point. If you do not enter a value, then the system uses a default that is applicable to most situations.

    • RRD Minimum - Enter a value. This system ignores values less than this number.
    • RRD Maximum - Enter a value. This system ignores values greater than this number.
  6. Click Save.

Thresholds

Thresholds are used to define noteworthy changes to a data point value in the form of an event.

For more information on the types of thresholds available, see thresholds.

Graph definitions

Graph definitions define which data points (and associated thresholds, if any) are graphed in the user interface.

For more information on the options available in a graph definition, see performance graphs.