Constructor and Description |
---|
DefaultRrdDao() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
afterPropertiesSet
|
InputStream |
createGraph(String command)
Create an RRD graph with the given command where RRD files are relative to the workDir.
|
int |
getGraphLeftOffset()
getGraphLeftOffset
|
int |
getGraphRightOffset()
getGraphRightOffset
|
int |
getGraphTopOffsetWithText()
getGraphTopOffsetWithText
|
Double |
getLastFetchValue(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.
|
Double |
getLastFetchValue(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.
|
double |
getPrintValue(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)
getPrintValues
|
File |
getRrdBaseDirectory()
getRrdBaseDirectory
|
String |
getRrdBinaryPath()
getRrdBinaryPath
|
RrdStrategy<?,?> |
getRrdStrategy()
getRrdStrategy
|
void |
setRrdBaseDirectory(File rrdBaseDirectory)
setRrdBaseDirectory
|
void |
setRrdBinaryPath(String rrdBinaryPath)
setRrdBinaryPath
|
void |
setRrdStrategy(RrdStrategy<?,?> rrdStrategy)
setRrdStrategy
|
public double getPrintValue(OnmsAttribute attribute, String cf, long start, long end)
getPrintValue
in interface RrdDao
attribute
- the attributecf
- consolidation function (usually "AVERAGE")start
- start time in millisecondsend
- end time in millisecondspublic double[] getPrintValues(OnmsAttribute attribute, String rraConsolidationFunction, long startTimeInMillis, long endTimeInMillis, String... printFunctions)
getPrintValues
getPrintValues
in interface RrdDao
attribute
- a OnmsAttribute
object.rraConsolidationFunction
- a String
object.startTimeInMillis
- a long.endTimeInMillis
- a long.printFunctions
- a String
object.public void afterPropertiesSet() throws Exception
afterPropertiesSet
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
- if any.public RrdStrategy<?,?> getRrdStrategy()
getRrdStrategy
RrdStrategy
object.public void setRrdStrategy(RrdStrategy<?,?> rrdStrategy)
setRrdStrategy
rrdStrategy
- a RrdStrategy
object.public void setRrdBaseDirectory(File rrdBaseDirectory)
setRrdBaseDirectory
rrdBaseDirectory
- a File
object.public void setRrdBinaryPath(String rrdBinaryPath)
setRrdBinaryPath
rrdBinaryPath
- a String
object.public InputStream createGraph(String command) throws org.springframework.dao.DataRetrievalFailureException
createGraph
in interface RrdDao
command
- RRD graph commandorg.springframework.dao.DataRetrievalFailureException
org.opennms.netmgt.dao.api.RrdDao#createGraph(java.lang.String, java.io.File)
public int getGraphTopOffsetWithText()
getGraphTopOffsetWithText
getGraphTopOffsetWithText
in interface RrdDao
RrdDao.getGraphTopOffsetWithText()
public int getGraphLeftOffset()
getGraphLeftOffset
getGraphLeftOffset
in interface RrdDao
RrdDao.getGraphLeftOffset()
public int getGraphRightOffset()
getGraphRightOffset
getGraphRightOffset
in interface RrdDao
RrdDao.getGraphRightOffset()
public Double getLastFetchValue(OnmsAttribute attribute, int interval) throws org.springframework.dao.DataAccessResourceFailureException
getLastFetchValue
in interface RrdDao
attribute
- The attribute for which fetch the last value. Must be a
RrdGraphAttribute.interval
- Fetch interval. This should equal RRD step size.org.springframework.dao.DataAccessResourceFailureException
public Double getLastFetchValue(OnmsAttribute attribute, int interval, int range) throws org.springframework.dao.DataAccessResourceFailureException
getLastFetchValue
in interface RrdDao
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.org.springframework.dao.DataAccessResourceFailureException
Copyright © 2021. All rights reserved.