$('a[name]').remove(); $('#ic-homepage__footer').before('

'); $("#tabs").tabs({ selected: 1 }); $("#ic-homepage__ic-tips").append( quickTipHTML() ); unhideOneProductTip(); $("#ic-homepage__product-tips").wrapInner('

'); $("#ic-homepage__feed-tips").wrapInner('

'); });

IBM Tivoli Monitoring > Version 6.3 > User's Guides > Log File Agent User's Guide > Format file IBM Tivoli Monitoring, Version 6.3


Inheritance

A format file uses inheritance to derive slot definitions from a previously defined format specification.

Use the FOLLOWS relationship to build specific format specifications from generic format specifications by using inheritance.

First, you define a base class and call it DiskFailure, for example, as shown here:

This regular expression matches the Disk Failure on device/dev/sd0 errors in the monitoring log so that the /dev/sd0 value is assigned to the device slot.

However, you can also see an extended version of this error message reported in the monitoring log.

For example, you might see a Disk Failure on device /dev/sd0, error code: 13 error message.

This error message is matched to a slot as shown in the following example:

Now, the event includes the device slot and the errcode slot. As the DiskFailure event class defined a slot for the device name already, you allow the subclass to inherit that slot, and this inheritance saves you from declaring it a second time. The slot is defined as $1 so the first sub expression in the regular expression is assigned to that slot.

However, the DiskFailureError class also defines a second sub expression. You can assign this sub expression to a new slot called errcode and define it as $2 to refer to the second sub expression in the regular expression. This type of assignment is shown in the previous example that displays the log text.

The event now contains the device slot that is assigned the /dev/sd0 value and the errcode slot that is assigned a value of 13. CustomSlot1 is assigned the device, and CustomSlot2 is assigned the error code.

IBM Tivoli Monitoring custom attribute mappings are also inherited. For more information about IBM Tivoli Monitoring custom attribute mappings, see Format file specifications.


Parent topic:

Format file

+

Search Tips   |   Advanced Search