org.opennms.netmgt.threshd
Class ThresholdingVisitor
java.lang.Object
org.opennms.netmgt.collectd.AbstractCollectionSetVisitor
org.opennms.netmgt.threshd.ThresholdingVisitor
- All Implemented Interfaces:
- CollectionSetVisitor
public class ThresholdingVisitor
- extends AbstractCollectionSetVisitor
Implements CollectionSetVisitor to implement thresholding.
Works by simply recording all the attributes that come in via visitAttribute
into an internal data structure, per resource, and then on "completeResource", does
threshold checking against that in memory structure.
Suggested usage is one per CollectableService; this object holds the current state of thresholds
for this interface/service combination
(so perhaps needs a better name than ThresholdingVisitor)
- Author:
- Alejandro Galue
ThresholdingVisitor
protected ThresholdingVisitor(int nodeId,
String hostAddress,
String serviceName,
RrdRepository repo)
initThresholdsDao
protected void initThresholdsDao()
reload
public void reload()
createThresholdingVisitor
public static ThresholdingVisitor createThresholdingVisitor(int nodeId,
String hostAddress,
String serviceName,
RrdRepository repo,
Map<String,String> params)
buildThresholdGroupList
public void buildThresholdGroupList()
visitResource
public void visitResource(CollectionResource resource)
- When called, we're starting a new resource. Clears out any stored attribute values from previous resource visits
- Specified by:
visitResource in interface CollectionSetVisitor- Overrides:
visitResource in class AbstractCollectionSetVisitor
visitAttribute
public void visitAttribute(CollectionAttribute attribute)
- Specified by:
visitAttribute in interface CollectionSetVisitor- Overrides:
visitAttribute in class AbstractCollectionSetVisitor
completeResource
public void completeResource(CollectionResource resource)
- Specified by:
completeResource in interface CollectionSetVisitor- Overrides:
completeResource in class AbstractCollectionSetVisitor
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2009. All Rights Reserved.