public class RrdJmxCollector extends Object implements JmxCollector
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DATA_SOURCE_NAME |
static String |
DEFAULT_METRICS_DIR |
static String |
DERIVE_DATA_SOURCE_TYPE |
static String |
GAUGE_DATA_SOURCE_TYPE |
static int |
ONE_YEAR_IN_15_MINUTE_STEPS |
static String |
RRD_FILENAME_SUFFIX |
static int |
TEN_YEARS_IN_HOURS |
Constructor and Description |
---|
RrdJmxCollector(String mbeanName,
String mbeanAttributeName,
String metricName) |
RrdJmxCollector(String mbeanName,
String mbeanAttributeName,
String metricName,
String metricType) |
RrdJmxCollector(String mbeanName,
String mbeanAttributeName,
String metricName,
String metricType,
String dataSourceName) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Cleanup when the JmxCollector is destroyed, e.g., when system is shutdown.
|
String |
getMbeanAttributeName() |
String |
getMbeanName() |
String |
getMetricName() |
String |
getMetricsDir() |
String |
getMetricType() |
String |
getRrdDataSourceType() |
String |
getRrdPath() |
protected int |
getSampleRate() |
protected long |
getSampleSkipCount() |
void |
init()
Initialization when the JmxCollector is created.
|
static boolean |
isNumeric(Object value)
Determines whether an object's value is a numeric type or a String with a numeric value.
|
void |
setMinimumUpdateTimeDelta(long minimumUpdateTimeDelta) |
protected void |
setSampleRate(int sampleRate) |
void |
updateSamples()
Configures a scheduled threaded executor to poll the metric's MBean periodically and add a
sample to the RRD file with the metric's current value.
|
public static final String DEFAULT_METRICS_DIR
public static final String RRD_FILENAME_SUFFIX
public static final String DERIVE_DATA_SOURCE_TYPE
public static final String DEFAULT_DATA_SOURCE_NAME
public static final String GAUGE_DATA_SOURCE_TYPE
public static final int ONE_YEAR_IN_15_MINUTE_STEPS
public static final int TEN_YEARS_IN_HOURS
public RrdJmxCollector(String mbeanName, String mbeanAttributeName, String metricName)
public RrdJmxCollector(String mbeanName, String mbeanAttributeName, String metricName, String metricType)
public static boolean isNumeric(Object value)
value
- the Object to be tested whether it has a numeric valuepublic String getMbeanName()
getMbeanName
in interface JmxCollector
public String getMbeanAttributeName()
getMbeanAttributeName
in interface JmxCollector
public String getMetricName()
getMetricName
in interface JmxCollector
public String getMetricType()
getMetricType
in interface JmxCollector
public void init()
public void destroy()
public void updateSamples() throws CollectorException
CollectorException
public String getMetricsDir()
public String getRrdPath()
public String getRrdDataSourceType()
protected int getSampleRate()
protected void setSampleRate(int sampleRate)
protected long getSampleSkipCount()
public void setMinimumUpdateTimeDelta(long minimumUpdateTimeDelta)
This work is licensed under a Creative Commons Attribution 4.0 International License.