Skip to content

Inheritance and override

The following diagram illustrates a portion of the standard device class hierarchy. A device class is a type of organizer that manages how the system models and monitors devices. At the root of the device hierarchy is the Devices object, under which all device class configuration properties are defined. Property values at the root level provide the default values for the entire hierarchy.

The illustration shows the following defined configuration properties:

  • zPingMonitorIgnore- Turns off all daemons that use ping. By default, its value at the root of the hierarchy is False.
  • zSNMPMonitorIgnore - Turns off all daemons that use SNMP. By default, itsvalue at the root of the hierarchy is True.

Through inheritance, properties that are defined at the root of the hierarchy apply to all objects beneath that node. So, at the /Devices/Server/Linux level of the device class hierarchy, the value of these two properties is the same as at /Devices, even though the property is not set explicitly at /Devices/Server/Linux. Inheritance simplifies system configuration because default values that are set at the root level apply to all devices regardless of their device class.

To further customize the system, you can change a specific configuration property at a lower level of the hierarchy without changing the definitions of other configuration properties. As shown in the following illustration, the value of zPingMonitorIgnore is changed so that ping monitoring is performed at the /Devices/Server/Windows level.

This locally defined value for zPingMonitorIgnore overrides the value that is set at the root of the hierarchy. No other properties at this level are affected by this local change; they continue to inherit the value that is set at the root.

Configuration properties allow you to configure the system at a very granular level, down to a particular device. For example, in the following illustration, for the device named dev.zenoss.com, the value of SNMPCommunity set to private. This value overrides the root value of public.

If you change the SNMPCommunity value of dev.zenoss.com to public, it matches the value that is set at the root, but is still explicitly defined. Only if you remove the locally defined property does it again inherit the value of the property that is set at the root.

Inheritance in the device class tree

Inheritance is defined by how many attributes are applied to a device at different levels in the device hierarchy. The following diagram shows an example of how and where configuration properties can be set throughout the device class tree.

In this example, you can see that the default properties can be set at the highest level (/). However, as you travel further down the hierarchy, you see that you can override any of the configuration properties that are set at the root level.

The next two lines show how the device tree further defines properties for Linux servers. For example, to set up and use SNMP monitoring for all Linux servers (inclusive of) build.zenoss.loc, you could change these properties at the /Server/Linux level.

Further, if you wanted to change how you collect information for remote Linux servers, you could create a sub-group in /Server/Linux called /Server/Linux/Remote, setting these servers to use SSH monitoring and changing the associated properties for that sub-group.

All of these configuration properties and groupings co-exist, with any changes made lower in the hierarchy taking priority.