Package org.opennms.netmgt.collectd
Class OnmsSnmpCollection
- java.lang.Object
-
- org.opennms.netmgt.collectd.OnmsSnmpCollection
-
public class OnmsSnmpCollection extends java.lang.Object
Represents SNMP collection data for a single collection period. It is particularly used to create a CollectionSet for a specific remote agent withcreateCollectionSet(org.opennms.netmgt.collectd.SnmpCollectionAgent)
and to provide data to CollectionSet and other classes that are created during collection.- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, DataCollectionConfigDao config, LocationAwareSnmpClient client)
Constructor for OnmsSnmpCollection.OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, LocationAwareSnmpClient client)
Constructor for OnmsSnmpCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnmpCollectionSet
createCollectionSet(SnmpCollectionAgent agent)
createCollectionSetjava.util.List<SnmpAttributeType>
getAliasAttributeTypes(SnmpCollectionAgent agent)
getAliasAttributeTypesjava.util.Collection<SnmpAttributeType>
getAttributeTypes(SnmpCollectionAgent agent)
getAttributeTypesjava.util.Collection<ResourceType>
getGenericIndexResourceTypes(SnmpCollectionAgent agent)
getGenericIndexResourceTypesIfAliasResourceType
getIfAliasResourceType(SnmpCollectionAgent agent)
getIfAliasResourceTypeIfResourceType
getIfResourceType(SnmpCollectionAgent agent)
getIfResourceTypejava.util.List<SnmpAttributeType>
getIndexedAttributeTypesForResourceType(SnmpCollectionAgent agent, ResourceType resourceType)
getIndexedAttributeTypesForResourceTypejava.lang.String
getName()
getNamejava.util.List<SnmpAttributeType>
getNodeAttributeTypes(SnmpCollectionAgent agent)
getNodeAttributeTypesNodeResourceType
getNodeResourceType(SnmpCollectionAgent agent)
getNodeResourceTypejava.util.Collection<? extends CollectionResource>
getResources(SnmpCollectionAgent agent)
getResourcesResourceType
getResourceType(SnmpCollectionAgent agent, java.lang.String instanceName)
getResourceTypeServiceParameters
getServiceParameters()
getServiceParametersjava.lang.String
getSnmpAuthPassPhrase(java.lang.String current)
getSnmpAuthPassPhrasejava.lang.String
getSnmpAuthProtocol(java.lang.String current)
getSnmpAuthProtocolint
getSnmpMaxRepetitions(int current)
getSnmpMaxRepetitionsint
getSnmpMaxRequestSize(int current)
getSnmpMaxRequestSizeint
getSnmpMaxVarsPerPdu(int current)
getSnmpMaxVarsPerPduint
getSnmpPort(int current)
getSnmpPortjava.lang.String
getSnmpPrivPassPhrase(java.lang.String current)
getSnmpPrivPassPhrasejava.lang.String
getSnmpPrivProtocol(java.lang.String current)
getSnmpPrivProtocoljava.net.InetAddress
getSnmpProxyFor(java.net.InetAddress current)
getSnmpProxyForjava.lang.String
getSnmpReadCommunity(java.lang.String current)
getSnmpReadCommunityint
getSnmpRetries(int current)
getSnmpRetriesjava.lang.String
getSnmpSecurityName(java.lang.String current)
getSnmpSecurityNameint
getSnmpTimeout(int current)
getSnmpTimeoutint
getSnmpVersion(int current)
getSnmpVersionjava.lang.String
getSnmpWriteCommunity(java.lang.String current)
getSnmpWriteCommunityjava.lang.String
getStorageFlag()
getStorageFlagjava.util.List<SnmpAttributeType>
loadAliasAttributeTypes(SnmpCollectionAgent agent)
loadAliasAttributeTypesjava.util.List<SnmpAttributeType>
loadAttributeTypes(SnmpCollectionAgent agent, int ifType)
loadAttributeTypesvoid
setDataCollectionConfigDao(DataCollectionConfigDao config)
setDataCollectionConfigjava.lang.String
toString()
toString
-
-
-
Constructor Detail
-
OnmsSnmpCollection
public OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, LocationAwareSnmpClient client)
Constructor for OnmsSnmpCollection.
- Parameters:
agent
- aCollectionAgent
object.params
- aServiceParameters
object.
-
OnmsSnmpCollection
public OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, DataCollectionConfigDao config, LocationAwareSnmpClient client)
Constructor for OnmsSnmpCollection.
- Parameters:
agent
- aCollectionAgent
object.params
- aServiceParameters
object.config
- aDataCollectionConfigDao
object.
-
-
Method Detail
-
getServiceParameters
public ServiceParameters getServiceParameters()
getServiceParameters
- Returns:
- a
ServiceParameters
object.
-
getName
public java.lang.String getName()
getName
- Returns:
- a
String
object.
-
getSnmpPort
public int getSnmpPort(int current)
getSnmpPort
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpRetries
public int getSnmpRetries(int current)
getSnmpRetries
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpTimeout
public int getSnmpTimeout(int current)
getSnmpTimeout
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpReadCommunity
public java.lang.String getSnmpReadCommunity(java.lang.String current)
getSnmpReadCommunity
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
getSnmpWriteCommunity
public java.lang.String getSnmpWriteCommunity(java.lang.String current)
getSnmpWriteCommunity
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
getSnmpProxyFor
public java.net.InetAddress getSnmpProxyFor(java.net.InetAddress current)
getSnmpProxyFor
- Parameters:
current
- aInetAddress
object.- Returns:
- a
InetAddress
object.
-
getSnmpVersion
public int getSnmpVersion(int current)
getSnmpVersion
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpMaxVarsPerPdu
public int getSnmpMaxVarsPerPdu(int current)
getSnmpMaxVarsPerPdu
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpMaxRepetitions
public int getSnmpMaxRepetitions(int current)
getSnmpMaxRepetitions
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpMaxRequestSize
public int getSnmpMaxRequestSize(int current)
getSnmpMaxRequestSize
- Parameters:
current
- a int.- Returns:
- a int.
-
getSnmpSecurityName
public java.lang.String getSnmpSecurityName(java.lang.String current)
getSnmpSecurityName
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
getSnmpAuthPassPhrase
public java.lang.String getSnmpAuthPassPhrase(java.lang.String current)
getSnmpAuthPassPhrase
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
getSnmpAuthProtocol
public java.lang.String getSnmpAuthProtocol(java.lang.String current)
getSnmpAuthProtocol
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
getSnmpPrivPassPhrase
public java.lang.String getSnmpPrivPassPhrase(java.lang.String current)
getSnmpPrivPassPhrase
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
getSnmpPrivProtocol
public java.lang.String getSnmpPrivProtocol(java.lang.String current)
getSnmpPrivProtocol
- Parameters:
current
- aString
object.- Returns:
- a
String
object.
-
setDataCollectionConfigDao
public void setDataCollectionConfigDao(DataCollectionConfigDao config)
setDataCollectionConfig
- Parameters:
config
- aDataCollectionConfigDao
object.
-
getStorageFlag
public java.lang.String getStorageFlag()
getStorageFlag
- Returns:
- a
String
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
createCollectionSet
public SnmpCollectionSet createCollectionSet(SnmpCollectionAgent agent)
createCollectionSet
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
SnmpCollectionSet
object.
-
getIndexedAttributeTypesForResourceType
public java.util.List<SnmpAttributeType> getIndexedAttributeTypesForResourceType(SnmpCollectionAgent agent, ResourceType resourceType)
getIndexedAttributeTypesForResourceType
- Parameters:
agent
- aCollectionAgent
object.resourceType
- aResourceType
object.- Returns:
- a
List
object.
-
getNodeAttributeTypes
public java.util.List<SnmpAttributeType> getNodeAttributeTypes(SnmpCollectionAgent agent)
getNodeAttributeTypes
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
List
object.
-
loadAttributeTypes
public java.util.List<SnmpAttributeType> loadAttributeTypes(SnmpCollectionAgent agent, int ifType)
loadAttributeTypes
- Parameters:
agent
- aCollectionAgent
object.ifType
- a int.- Returns:
- a
List
object.
-
getResourceType
public ResourceType getResourceType(SnmpCollectionAgent agent, java.lang.String instanceName)
getResourceType
- Parameters:
agent
- aCollectionAgent
object.instanceName
- aString
object.- Returns:
- a
ResourceType
object.
-
getNodeResourceType
public NodeResourceType getNodeResourceType(SnmpCollectionAgent agent)
getNodeResourceType
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
NodeResourceType
object.
-
getIfResourceType
public IfResourceType getIfResourceType(SnmpCollectionAgent agent)
getIfResourceType
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
IfResourceType
object.
-
getIfAliasResourceType
public IfAliasResourceType getIfAliasResourceType(SnmpCollectionAgent agent)
getIfAliasResourceType
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
IfAliasResourceType
object.
-
getGenericIndexResourceTypes
public java.util.Collection<ResourceType> getGenericIndexResourceTypes(SnmpCollectionAgent agent)
getGenericIndexResourceTypes
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
Collection
object.
-
getAttributeTypes
public java.util.Collection<SnmpAttributeType> getAttributeTypes(SnmpCollectionAgent agent)
getAttributeTypes
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
Collection
object.
-
getResources
public java.util.Collection<? extends CollectionResource> getResources(SnmpCollectionAgent agent)
getResources
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
Collection
object.
-
loadAliasAttributeTypes
public java.util.List<SnmpAttributeType> loadAliasAttributeTypes(SnmpCollectionAgent agent)
loadAliasAttributeTypes
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
List
object.
-
getAliasAttributeTypes
public java.util.List<SnmpAttributeType> getAliasAttributeTypes(SnmpCollectionAgent agent)
getAliasAttributeTypes
- Parameters:
agent
- aCollectionAgent
object.- Returns:
- a
List
object.
-
-