org.opennms.netmgt.threshd
Class SnmpThresholder

java.lang.Object
  extended by org.opennms.netmgt.threshd.SnmpThresholder
All Implemented Interfaces:
ServiceThresholder

Deprecated. No longer used - see ThresholdingVisitor

public final class SnmpThresholder
extends Object
implements ServiceThresholder

The SnmpThresholder class ...

Author:
Mike Davidson , OpenNMS

Field Summary
 
Fields inherited from interface org.opennms.netmgt.threshd.ServiceThresholder
statusType, THRESHOLDING_FAILED, THRESHOLDING_SUCCEEDED, THRESHOLDING_UNKNOWN
 
Constructor Summary
SnmpThresholder()
          Deprecated.  
 
Method Summary
 int check(ThresholdNetworkInterface netIface, EventProxy eproxy, Map parms)
          Deprecated. Perform threshold checking.
protected  void checkIfDir(File directory, SnmpThresholdNetworkInterface snmpIface, Date date, Events events)
          Deprecated. Performs threshold checking on an SNMP RRD interface directory.
protected  void checkNodeDir(File directory, SnmpThresholdNetworkInterface thresholdNetworkInterface, Date date, Events events)
          Deprecated. Performs threshold checking on an SNMP RRD node directory.
protected  void checkResourceDir(File directory, SnmpThresholdNetworkInterface snmpIface, Date date, Events events)
          Deprecated.  
protected static Map<String,Set<ThresholdEntity>> getAttributeMap(ThresholdResourceType resourceType)
          Deprecated.  
 IfInfoGetter getIfInfoGetter()
          Deprecated.  
 ThresholdsDao getThresholdsDao()
          Deprecated.  
 void initialize(Map parameters)
          Deprecated.  Initialize the service thresholder.
 void initialize(ThresholdNetworkInterface netIface, Map parms)
          Deprecated. Responsible for performing all necessary initialization for the specified interface in preparation for thresholding.
protected  boolean passedThresholdFilters(File resourceDir, String thresholdGroup, String resourceType, String dataSource)
          Deprecated.  
 void reinitialize()
          Deprecated. Called when configurations have changed and need to be refreshed at the ServiceThresolder level.
 void release()
          Deprecated. Responsible for freeing up any resources held by the thresholder.
 void release(ThresholdNetworkInterface iface)
          Deprecated. Responsible for releasing any resources associated with the specified interface.
 String serviceName()
          Deprecated.  Returns the name of the service that the plug-in collects ("SNMP").
 void setIfInfoGetter(IfInfoGetter ifInfoGetter)
          Deprecated.  
 void setThresholdsDao(ThresholdsDao thresholdsDao)
          Deprecated.  
protected  String stripRrdExtension(String fileName)
          Deprecated. File name has format:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpThresholder

public SnmpThresholder()
Deprecated. 
Method Detail

serviceName

public String serviceName()
Deprecated. 

Returns the name of the service that the plug-in collects ("SNMP").

Returns:
The service that the plug-in collects.

initialize

public void initialize(Map parameters)
Deprecated. 

Initialize the service thresholder.

Specified by:
initialize in interface ServiceThresholder
Parameters:
parameters - Not currently used.
Throws:
RuntimeException - Thrown if an unrecoverable error occurs that prevents the plug-in from functioning.

reinitialize

public void reinitialize()
Deprecated. 
Description copied from interface: ServiceThresholder
Called when configurations have changed and need to be refreshed at the ServiceThresolder level. Should not do a "full" initialization, but just reload any config objects that might have incorrect cached data. It is up to the caller to call "release/initialize" for any interfaces that need reinitialization, and it is recommended to do so *after* calling reinitialize(), so that any objects that might be used in initializing the interfaces have been reloaded.

Specified by:
reinitialize in interface ServiceThresholder

release

public void release()
Deprecated. 
Responsible for freeing up any resources held by the thresholder.

Specified by:
release in interface ServiceThresholder

initialize

public void initialize(ThresholdNetworkInterface netIface,
                       Map parms)
Deprecated. 
Responsible for performing all necessary initialization for the specified interface in preparation for thresholding.

Specified by:
initialize in interface ServiceThresholder
Parameters:
iface - Network interface to be prepped for thresholding.
parameters - Key/value pairs associated with the package to which the interface belongs..

release

public void release(ThresholdNetworkInterface iface)
Deprecated. 
Responsible for releasing any resources associated with the specified interface.

Specified by:
release in interface ServiceThresholder
Parameters:
iface - Network interface to be released.

check

public int check(ThresholdNetworkInterface netIface,
                 EventProxy eproxy,
                 Map parms)
Deprecated. 
Perform threshold checking.

Specified by:
check in interface ServiceThresholder
Parameters:
iface - Network interface to be data collected.
eproxy - Eventy proxy for sending events.
parameters - Key/value pairs from the package to which the interface belongs.

checkNodeDir

protected void checkNodeDir(File directory,
                            SnmpThresholdNetworkInterface thresholdNetworkInterface,
                            Date date,
                            Events events)
                     throws IllegalArgumentException
Deprecated. 
Performs threshold checking on an SNMP RRD node directory.

Parameters:
directory - RRD repository directory
snmpIface - TODO
date - Source for timestamp to be used for all generated events
events - Castor events object containing any events to be generated as a result of threshold checking.
interval - Configured thresholding interval
range - Time interval before last possible PDP is considered "out of date"
thresholdMap - Map of node level ThresholdEntity objects keyed by datasource name.
nodeId - Node identifier
primary - Primary SNMP interface address
Throws:
IllegalArgumentException - if path parameter is not a directory.

checkIfDir

protected void checkIfDir(File directory,
                          SnmpThresholdNetworkInterface snmpIface,
                          Date date,
                          Events events)
                   throws IllegalArgumentException
Deprecated. 
Performs threshold checking on an SNMP RRD interface directory.

Parameters:
directory - RRD repository directory
snmpIface - TODO
date - Source for timestamp to be used for all generated events
allIfThresholdMap - Map of threshold maps indexed by ifLabel
events - Castor events object containing any events to be generated as a result of threshold checking.
nodeId - Node identifier
primary - Primary SNMP interface address
interval - Configured thresholding interval
range - Time interval before last possible PDP is considered "out of date"
baseIfThresholdMap - Map of configured interface level ThresholdEntity objects keyed by datasource name.
Throws:
IllegalArgumentException - if path parameter is not a directory.

checkResourceDir

protected void checkResourceDir(File directory,
                                SnmpThresholdNetworkInterface snmpIface,
                                Date date,
                                Events events)
                         throws IllegalArgumentException
Deprecated. 
Throws:
IllegalArgumentException

passedThresholdFilters

protected boolean passedThresholdFilters(File resourceDir,
                                         String thresholdGroup,
                                         String resourceType,
                                         String dataSource)
Deprecated. 

stripRrdExtension

protected String stripRrdExtension(String fileName)
Deprecated. 
File name has format:

Returns:
the fileName with the portion stripped off the end.

getAttributeMap

protected static Map<String,Set<ThresholdEntity>> getAttributeMap(ThresholdResourceType resourceType)
Deprecated. 

getThresholdsDao

public ThresholdsDao getThresholdsDao()
Deprecated. 

setThresholdsDao

public void setThresholdsDao(ThresholdsDao thresholdsDao)
Deprecated. 

getIfInfoGetter

public IfInfoGetter getIfInfoGetter()
Deprecated. 

setIfInfoGetter

public void setIfInfoGetter(IfInfoGetter ifInfoGetter)
Deprecated. 


Copyright © 2009. All Rights Reserved.