Circuit Breaker Filter

Definition

Description

Stop and discard the event flow when the rate reaches Threshold events per TimeInterval, and restart the event flow again when the event flow falls below that rate.
Perform ActionList when the event flow is stopped.
Perform ActionList when the event flow is restarted.

 

 

Comments

The event flow is stopped as soon as Threshold is reached during TimeInterval.

The TimeInterval starts when the first event arrives.

The event flow is restarted only after the completion of a full TimeInterval with less than Threshold events.

If the TimeInterval is zero, empty, or missing then the TimeInterval will be the duration of the ECS process session.

If Threshold is empty, missing, blank or less than or equal to zero, disable the filter.

If values are set in the current event when the flow is stopped, no effect will be visible since the event is discarded.

 

Example

<filter objectId="Filter.BreakCircuit" type="CircuitBreakerFilter">
	<parameter type="Threshold">33</parameter>
	<parameter type="TimeInterval">
		<time>10</time>
		<units>min</units>
	</parameter>
	<parameter type="ActionList">    <!-stop actions -->
		<action type="SetEventFieldList">
			<setEventField fieldName="ev:msg3">
				<type>String</type>    <!-insides of "Expression" parm -->
				<formatString>redundant event %1% %2%</formatString>
				<formatParmSpec>          	
					<type>EventType</type>
					<name>ev:msg</name>
				</formatParmSpec>
			</setEventField>
		</action>
	</parameter>	
	<parameter type="ActionList">		<!-restart actions -->
		<action type="NewEvent">
			<halPolicy>new</halPolicy>
			<hal>
				<host>Host3</host>		<!-default is current host -->
				<app>App3</app>			<!-default is "EventGnosis" -->
				<log>Log3</log>			<!-default is "Notifications" -->
			</hal>
			<destinationSpec>
				<type>insertIntoStream</type>
			</destinationSpec>
			<setEventFieldList>
				<setEventField fieldName="ev:msg3">
					<type>String</type>
					<formatString>ev:host field: 1%</formatString>
					<formatParmSpec>	<!-0..N of these -->
						<type>EventType</type>
						<name>ev:host</name>
					</formatParmSpec>
				</setEventField>
				<setEventField fieldName="ev:msg4">
					<type>String</type>
					<formatString>ev:app field: %1%</formatString>
					<formatParmSpec>
						<type>EventType</type>
						<name>ev:app</name>
					</formatParmSpec>
				</setEventField>
			</setEventFieldList>
		</action>
	</parameter>	
</filter>