In order to use the Event Log Processor , you have to declare it in the Event Processing Manager configuration < DCF-Install>/Event-Processing/Event-Processing-Manager/<INSTANCE ID>/conf/processing.xml.

<processing-manager
	xmlns="http://www.watch4net.com/Events/DefaultProcessingManager"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.watch4net.com/Events/DefaultProcessingManager DefaultProcessingManager.xsd ">

	<processing-element name="KAFKA" enabled="true"
		type="Kafka-Event-Adapter"
		config="Kafka-Event-Adapter/smarts-notifs-events/conf/kafka-event-adapter.xml" />
	<processing-element name="LOG-PROCESSOR"
		config="Event-Log-Processor/smarts-notifs-events/conf/event-log.xml"
		data="KAFKA" />
	<processing-element name="Smarts" enabled="true"
		config="Smarts-Listener/smarts-notifs-events/conf/smarts-listener.xml"
		data="LOG-PROCESSOR" />
	<processing-element name="EVENT-SPY" enabled="true"
		type="EventSpy" config="Event-Processing-Utils/smarts-notifs-events/conf" />
</processing-manager>

The above example declaration is from Smarts Events SP. The above configuration creates Event Log Processor and other components. The Event Log Processor accepts incoming events from Smarts listener. And, forward processed data to KAFKA which is another Processing Element through the data stream.

Event Log Processor Configuration

The Event Log Processor configuration basically consists of declaring the rules that we want incoming events to go through. As a simple example, the configuration for the Rule Evaluation Example can be written in the following way:

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://www.watch4net.com/Events/EventLogProcessor">
<rule name="Rule 1" />
<rules>
<rule name="Rule 2" />
<rule name="Rule 3" />
<rule name="Rule 4" />
</rules>
<rule name="Rule 5" />
<rule name="Rule 6" />
</rules>

The rules element allows for the creation of chains. A chain is evaluated as described in section 1 . This example uses a fictional < rule > tag to represent actual rules, which would be replaced with the syntax of the available rules as defined in section 3.

Each rule has an optional name attribute. It is mostly used as a description of the rule. It has no impact on evaluation but might help with troubleshooting since it is written in the log files in the event of an error.

To override the result of a rule, you can use the following attributes:
  • on-continue to redefine the behavior of a rule that returns continue

  • on-success to redefine the behavior of a rule that returns success

  • on-failure to redefine the behavior of a rule that returns failure

  • on-error to redefine the behavior of a rule that returns error

To continue the example from section 1 , a way to override Rule 5 could be the following:

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://www.watch4net.com/Events/EventLogProcessor">
<rule name="Rule 1" />
<rules>
<rule name="Rule 2" />
<rule name="Rule 3" />
<rule name="Rule 4" />
</rules>
<rule name="Rule 5" on-success="continue" />
<rule name="Rule 6" />
</rules>

A example implementation for Smarts events SP can be like below:

Sample file from sample implementation example: <DCF-Install>/Event-Log-Processor/<INSTANCE ID>/conf/event-log.xml

<rules xmlns="http://www.watch4net.com/Events/EventLogProcessor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.watch4net.com/Events/EventLogProcessor EventLogProcessor.xsd">

       <format name="Unique ID" pattern="{0}" to="@Id" type="message">
           <field name="Id" type="LONG" />
       </format>
       
	<!-- Simply forward events to the data stream without modifying them. -->
	<forward stream="data" />

</rules>
In above configuration example the event set data is matched with "Id" as key, if any key having Id is found then it will get replaced with @Id. All other events which don't have this key will be automatically forwarded to next processing element.
Note: To use below rules and formatting options of Event Log Processor needs similar kind of configurations in DCF installation.