Package org.opennms.netmgt.dao.api
Interface RrdDao
- 
- All Known Implementing Classes:
- DefaultRrdDao,- MockRrdDao
 
 public interface RrdDaoRrdDao interface. - Version:
- $Id: $
- Author:
- DJ Gregor
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamcreateGraph(String command)Create an RRD graph with the given command where RRD files are relative to the workDir.intgetGraphLeftOffset()Gets the offset of the left side of the graph box from the left side of the image.intgetGraphRightOffset()Gets the offset of the right side of the graph box from the right side of the image.intgetGraphTopOffsetWithText()Gets the offset of the top of the graph box from the top of the image.DoublegetLastFetchValue(OnmsAttribute attribute, int interval)This method issues an round robin fetch command to retrieve the last value of the data source stored in the specified RRD file.DoublegetLastFetchValue(OnmsAttribute attribute, int interval, int range)This method issues an round robin fetch command to retrieve the last value of the data source stored in the specified RRD file.doublegetPrintValue(OnmsAttribute attribute, String cf, long start, long end)Get the value for an attribute over a period of time.double[]getPrintValues(OnmsAttribute attribute, String rraConsolidationFunction, long startTimeInMillis, long endTimeInMillis, String... printFunctions)Get the value for an attribute over a period of time.
 
- 
- 
- 
Method Detail- 
getPrintValuedouble getPrintValue(OnmsAttribute attribute, String cf, long start, long end) Get the value for an attribute over a period of time.- Parameters:
- attribute- the attribute
- cf- consolidation function (usually "AVERAGE")
- start- start time in milliseconds
- end- end time in milliseconds
- Returns:
- value
 
 - 
getPrintValuesdouble[] getPrintValues(OnmsAttribute attribute, String rraConsolidationFunction, long startTimeInMillis, long endTimeInMillis, String... printFunctions) Get the value for an attribute over a period of time.- Parameters:
- attribute- the attribute
- rraConsolidationFunction- consolidation function (usually "AVERAGE")
- startTimeInMillis- start time in milliseconds
- endTimeInMillis- end time in milliseconds
- printFunctions- a- Stringobject.
- Returns:
- value
 
 - 
createGraphInputStream createGraph(String command) Create an RRD graph with the given command where RRD files are relative to the workDir.- Parameters:
- command- RRD graph command
- workDir- RRD files are relative to this directory
- Returns:
- PNG graph image
 
 - 
getGraphTopOffsetWithTextint getGraphTopOffsetWithText() Gets the offset of the top of the graph box from the top of the image.- Returns:
- offset in pixels
 
 - 
getGraphLeftOffsetint getGraphLeftOffset() Gets the offset of the left side of the graph box from the left side of the image.- Returns:
- offset in pixels
 
 - 
getGraphRightOffsetint getGraphRightOffset() Gets the offset of the right side of the graph box from the right side of the image.- Returns:
- offset in pixels
 
 - 
getLastFetchValueDouble getLastFetchValue(OnmsAttribute attribute, int interval) throws org.springframework.dao.DataAccessException This method issues an round robin fetch command to retrieve the last value of the data source stored in the specified RRD file. NOTE: This method assumes that each RRD file contains a single data source.- Parameters:
- attribute- The attribute for which fetch the last value. Must be a RrdGraphAttribute.
- interval- Fetch interval. This should equal RRD step size.
- Returns:
- Retrived value or null if some errors occur
- Throws:
- org.springframework.dao.DataAccessException- if an error occurs retrieving the last value
 
 - 
getLastFetchValueDouble getLastFetchValue(OnmsAttribute attribute, int interval, int range) throws org.springframework.dao.DataAccessException This method issues an round robin fetch command to retrieve the last value of the data source stored in the specified RRD file. NOTE: This method assumes that each RRD file contains a single data source.- Parameters:
- attribute- The attribute for which fetch the last value. Must be a RrdGraphAttribute.
- interval- Fetch interval in milliseconds. This should equal the RRD step size.
- range- Interval in milliseconds for how long we should look back in time for a non-NaN value. This should a multiple of the RRD step size.
- Returns:
- Retrived value or null if some errors occur
- Throws:
- org.springframework.dao.DataAccessException- if an error occurs retrieving the last value
 
 
- 
 
-