|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
org.perf4j.logback.JmxAttributeStatisticsAppender
public class JmxAttributeStatisticsAppender
This appender is designed to be attached to an AsyncCoalescingStatisticsAppender
. It takes the incoming
GroupedTimingStatistics log messages and uses this data to update the value of a JMX MBean. The attributes on this
MBean can then be monitored by external tools. In addition, this class allows you to specify notification thresholds
so that a JMX notification is sent if one of the attributes falls outside an acceptable range (for example, if
the mean time for a specific value is too high).
Field Summary | |
---|---|
protected StatisticsExposingMBean |
mBean
This is the MBean that is registered with the MBeanServer |
Fields inherited from class ch.qos.logback.core.AppenderBase |
---|
layout, name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
JmxAttributeStatisticsAppender()
|
Method Summary | |
---|---|
protected void |
append(ch.qos.logback.classic.spi.LoggingEvent event)
|
String |
getMBeanName()
The MBeanName option is used to specify the ObjectName under which the StatisticsExposingMBean in the MBeanServer. |
protected MBeanServer |
getMBeanServer()
Gets the MBeanServer that should be used to register the StatisticsExposingMBean. |
String |
getNotificationThresholds()
The NotificationThresholds option is a comma-separated list of acceptable range configurations. |
String |
getTagNamesToExpose()
The TagNamesToExpose option is a comma-separated list of the tag names whose statistics values (e.g. |
void |
setMBeanName(String mBeanName)
Sets the value of the MBeanName option. |
void |
setNotificationThresholds(String notificationThresholds)
Sets the value of the NotificationThresholds option. |
void |
setTagNamesToExpose(String tagNamesToExpose)
Sets the value of the TagNamesToExpose option. |
void |
start()
|
void |
stop()
|
Methods inherited from class ch.qos.logback.core.AppenderBase |
---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getFirstFilter, getLayout, getName, isStarted, setLayout, setName, toString |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
Field Detail |
---|
protected StatisticsExposingMBean mBean
Constructor Detail |
---|
public JmxAttributeStatisticsAppender()
Method Detail |
---|
public String getMBeanName()
public void setMBeanName(String mBeanName)
mBeanName
- The new value for the MBeanName option.public String getTagNamesToExpose()
StatisticsExposingMBean
for more details.
public void setTagNamesToExpose(String tagNamesToExpose)
tagNamesToExpose
- The new value for the TagNamesToExpose option.public String getNotificationThresholds()
The format of an acceptable range configuration is tagNameStatName(range) where range can be one of <value, >value, or minValue-maxValue. For example, suppose the TagNamesToExpose option was set to "databaseCall,fileWrite". This would cause the generated MBean to expose the following attributes:
databaseCallMean(<100),databaseCallMax(<1000),fileWriteMean(5-200),fileWriteTPS(>1)
public void setNotificationThresholds(String notificationThresholds)
notificationThresholds
- The new value for the NotificationThresholds option.public void start()
start
in interface ch.qos.logback.core.spi.LifeCycle
start
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
public void stop()
stop
in interface ch.qos.logback.core.spi.LifeCycle
stop
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
protected void append(ch.qos.logback.classic.spi.LoggingEvent event)
append
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
protected MBeanServer getMBeanServer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |