@Tags(value={"reporting","rules","action","action handler","status","connection","processor","jvm","metrics","history","bulletin","sql"}) @CapabilityDescription(value="Triggers rules-driven actions based on metrics values ") @Stateful(scopes=LOCAL, description="Stores the Reporting Task\'s last execution time so that on restart the task knows where it left off.") public class MetricsEventReportingTask extends AbstractReportingTask implements QueryTimeAware
| Modifier and Type | Field and Description |
|---|---|
private PropertyContextActionHandler |
actionHandler |
private MetricsQueryService |
metricsQueryService |
private List<PropertyDescriptor> |
properties |
private RulesEngineService |
rulesEngineService |
| Constructor and Description |
|---|
MetricsEventReportingTask() |
| Modifier and Type | Method and Description |
|---|---|
private void |
fireRules(ReportingContext context,
PropertyContextActionHandler actionHandler,
RulesEngineService engine,
String query) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ReportingInitializationContext config) |
void |
onTrigger(ReportingContext context) |
void |
setup(ConfigurationContext context) |
getControllerServiceLookup, getIdentifier, getLogger, getName, getNodeTypeProvider, getSchedulingPeriod, initialize, setComponentInfocustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCurrentTime, processStartAndEndTimesisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate List<PropertyDescriptor> properties
private MetricsQueryService metricsQueryService
private volatile RulesEngineService rulesEngineService
private volatile PropertyContextActionHandler actionHandler
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected void init(ReportingInitializationContext config)
init in class AbstractReportingTask@OnScheduled public void setup(ConfigurationContext context)
public void onTrigger(ReportingContext context)
onTrigger in interface ReportingTaskprivate void fireRules(ReportingContext context, PropertyContextActionHandler actionHandler, RulesEngineService engine, String query) throws Exception
ExceptionCopyright © 2022 Apache NiFi Project. All rights reserved.