Configuring the sensor component for a static adapter
Prerequisites:
The role of the sensor is to provide the means to read the content for processing.
In a static parser, a property is added to the sensor to indicate that following the sensor
processing, it should call a custom Java parser class. To configure the sensor:
- In the left pane of the Adapter Configuration Editor,
select Configuration > Context Instance > Sensor.
The right pane displays the sensor information.
- Select StaticParserSensor from the Sensor type list.
- In the details pane, type a description of your sensor in the Description field.
- In the Maximum Blocking field, type the number of Common Base Event objects
that are created by the static parser sensor before they are passed to the outputter.
This value indicates how many Common Base Event objects the parseNext()
method of the static parser class should return.
This value is passed to the static parser class as the array_size
parameter by the setConfiguration() method of the static parser class.
- For the static adapter, the fields Confidence Buffer Size and File Footer Size apply only for contexts configured for continuous operation and static parser classes that extend org.eclipse.hyades.logging.parsers.MonitoringParser. Refer to Configuring the sensor component for information on these fields.
- The directory and fileName properties are automatically generated
when the adapter configuration file is created. These correspond to the log file directory and file name.
To update these properties:
- Select Configuration > Context Instance > Sensor > Property fileName.
- Edit the property value.
- Save the adapter configuration file to apply the changes.
- Repeat the same steps for the directory property.
- Add the parserClassName property.
- Select Configuration > Context Instance > Sensor.
- Right-click to bring up the pop-up menu.Select Add > Property. The right pane refreshes
with fields to enter the property name and value.
- Type parserClassName as the property name and the name of your
Java parser class as the property value.
- Save the adapter configuration file to apply the changes.
- You can add other properties that contain
configuration information that can be passed to the static parser Java class.
For example, the log file version.
- Since you changed the Sensor Type, you need to update the corresponding sensor component under Contexts.
- Select Contexts > Context Basic Context Implementation > Component OS File Sensor.
- Update the Name and Description. Type
org.eclipse.hyades.logging.adapter.config.sensors.StaticParserSensor
as the
Executable class.

- Save the adapter configuration file to apply the changes.
Refer to the Configuration
file structure for a summary of the properties required for the sensor
component of a static parser.
Once the sensor is configured, you can proceed to configure the outputter component.
Related Concepts
Overview of the Hyades Generic Log Adapter
Common Base Event format specification
Related tasks
Creating a log parser
Creating a static adapter
Configuring the outputter component for static parsers
Related references
Adapter Configuration File structure
Adapter Configuration Editor
Regular expression grammar
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.