Configuring the sensor component for a rules-based parser
Prerequisites:
Creating an adapter configuration file
The role of the sensor is to read the log content for processing. To configure the sensor
for a rules-based parser, follow these steps:
- In the left pane of the Adapter Configuration Editor, select Configuration > Context Instance > Sensor.
The right pane displays the sensor information.
- In the Sensor type list, select the SingleFileSensor.
- Type a description of your sensor in the Description field.
- In the Maximum Blocking field, type the number of
lines you want the sensor to process before passing the
information to the extractor.
- Some log files append a footer to the end of the log file. This part of the log file
is not considered log data, and needs to be excluded when monitoring a log file for changes.
You can specify the log file footer size in bytes in the File Footer Size field.
The default size is 90 bytes.
- If a log file is being monitored in continuous operation, the last n bytes of the log file
is stored in memory. This stored data, called a confidence buffer, is compared to the last n bytes of the
log file being monitored to check whether or not the log file has changed. You can specify the size of
the confidence buffer in the Confidence Buffer Size field. The default size is 1024 bytes.
- The the directory and fileName properties were automatically generated
when you created the adapter configuration file. These properties correspond to the log
file directory and file name. To update these properties, follow these steps:
- Select Configuration > Context Instance > Sensor > Property directory.
- Edit the property value.
- Save the adapter configuration file to apply the changes.
- Repeat steps a to c for the file name property.
- Two optional properties that can be added are the converter
and shell properties. To configure these properties:
- Select Configuration > Context Instance > Sensor.
- Right-click on the sensor to bring up the pop-up menu.
Select Add > Property. The right pane refreshes
with fields to enter the property name and value.
- Type the name and value of the property.
- Save the adapter configuration file to apply the changes.
- To test that your log file is being loaded by the sensor, click the Re-run adapter
icon to run the adapter. The results will be shown in the Sensor Result view.
Refer to the Sensor properties table for an
explaination of the properties required for the sensor component of a rule-based parser.
Once the sensor is configured, you can continue on to configure the extractor component.
Related Concepts
Overview of the Hyades Generic Log Adapter
Related tasks
Creating a log parser
Creating a rules-based adapter
Configuring context instance
Configuringthe extractor component
Configuring parser component
Configuring outputter component
Related references
Adapter Configuration File structure
Adapter Configuration Editor
Regular expression grammar
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.