|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.collectd.DataSource
org.opennms.netmgt.rrd.RRDDataSource
This class encapsulates an RRDTool data source. Data source information parsed from the DataCollection.xml file is stored in RRDDataSource objects. For additional information on RRD and RRDTool see: http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/
Field Summary | |
private static int |
COUNTER_INDEX
Index of data type in supportedObjectTypes string array. |
private static java.lang.String |
DST_COUNTER
|
private static java.lang.String |
DST_GAUGE
RRDTool defined Data Source Types NOTE: "DERIVE" and "ABSOLUTE" not currently supported. |
private static int |
GAUGE_INDEX
|
private static int |
INTEGER_INDEX
|
private int |
m_heartbeat
Data Source Heartbeat. |
private java.lang.String |
m_max
Maximum Expected Range. |
private java.lang.String |
m_min
Minimum Expected Range. |
private java.lang.String |
m_type
Data Source Type. |
private static int |
MAX_DS_NAME_LENGTH
|
private static int |
OCTETSTRING_INDEX
|
static java.lang.String |
RRD_ERROR
|
private static java.lang.String[] |
supportedObjectTypes
Defines the list of supported (MIB) object types whic may be mapped to one of the supported RRD data source types. |
private static int |
TIMETICKS_INDEX
|
Fields inherited from class org.opennms.netmgt.collectd.DataSource |
m_instance, m_name, m_oid |
Constructor Summary | |
RRDDataSource()
Constructor |
|
RRDDataSource(MibObject obj,
java.lang.String collectionName)
|
|
RRDDataSource(RRDDataSource second)
Class copy constructor. |
Method Summary | |
java.lang.Object |
clone()
Used to get a duplicate of self. |
int |
getHeartbeat()
|
java.lang.String |
getMax()
|
java.lang.String |
getMin()
|
java.lang.String |
getStorableValue(SnmpSyntax snmpVar)
This method extracts from snmpVar a string which can be passed as the val parameter of performUpdate. |
java.lang.String |
getType()
Returns the object's data type. |
static boolean |
handlesType(java.lang.String objectType)
|
static java.lang.String |
mapType(java.lang.String objectType)
Static method which takes a MIB object type (counter, counter32, octetstring, etc...) and returns the appropriate RRD data type. |
boolean |
performUpdate(java.lang.String collectionName,
java.lang.String owner,
java.lang.String repository,
java.lang.String dsName,
java.lang.String val)
Stores the value val in the datasource named dsName, in repository repository. |
void |
setHeartbeat(int heartbeat)
|
void |
setMax(java.lang.String maximum)
|
void |
setMin(java.lang.String minimum)
|
void |
setType(java.lang.String type)
This method is used to assign the object's expected data type. |
java.lang.String |
toString()
This method is responsible for returning a String object which represents the content of this RRDDataSource object. |
Methods inherited from class org.opennms.netmgt.collectd.DataSource |
dataSourceForMibObject, getFullOid, getInstance, getName, getOid, setInstance, setName, setOid |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final int MAX_DS_NAME_LENGTH
public static final java.lang.String RRD_ERROR
private static final java.lang.String[] supportedObjectTypes
private static final int COUNTER_INDEX
private static final int GAUGE_INDEX
private static final int TIMETICKS_INDEX
private static final int INTEGER_INDEX
private static final int OCTETSTRING_INDEX
private static final java.lang.String DST_GAUGE
private static final java.lang.String DST_COUNTER
private java.lang.String m_type
private int m_heartbeat
private java.lang.String m_min
private java.lang.String m_max
Constructor Detail |
public RRDDataSource()
public RRDDataSource(MibObject obj, java.lang.String collectionName)
public RRDDataSource(RRDDataSource second)
second
- The object to make a duplicate of.Method Detail |
public static boolean handlesType(java.lang.String objectType)
objectType
- MIB object type being inquired about
public static java.lang.String mapType(java.lang.String objectType)
objectType
- -
MIB object type to be mapped.
public void setType(java.lang.String type)
type
- -
object's data typepublic void setHeartbeat(int heartbeat)
public void setMin(java.lang.String minimum)
public void setMax(java.lang.String maximum)
public java.lang.String getType()
public int getHeartbeat()
public java.lang.String getMin()
public java.lang.String getMax()
public java.lang.Object clone()
public java.lang.String toString()
public boolean performUpdate(java.lang.String collectionName, java.lang.String owner, java.lang.String repository, java.lang.String dsName, java.lang.String val)
DataSource
val
in the datasource named dsName, in repository repository. Creates
the store if need be (e.g. an rrd file, or a properties file, or whatever)
performUpdate
in class DataSource
public java.lang.String getStorableValue(SnmpSyntax snmpVar)
DataSource
getStorableValue
in class DataSource
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |