<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd"> <!-- $Id: jvm-monitor-service.xml,v 1.1 2005/08/07 12:32:48 dimitris Exp $ --> <!--============================================================================ | JVM LoggingMonitor Service Configuration | | An example configuration of the LoggingMonitor service to monitor JVM thread | and heap useage information. |===========================================================================--> <server> <mbean code="org.jboss.services.loggingmonitor.LoggingMonitor" name="jboss.monitor:type=LoggingMonitor,name=JVMMonitor"> <!-- | The name of the file to which monitoring information will be logged. --> <attribute name="Filename">${jboss.server.home.dir}/log/jvm.log</attribute> <!-- | Whether or not this monitor's log file should have information appended | to it, if it already exists. This attribute is *not* required, and the | default value is true. --> <attribute name="AppendToFile">false</attribute> <!-- | Controls the org.apache.log4j.PatternLayout for logging entries. | The default pattern is "%d %-5p [%c] %m%n". <attribute name="PatternLayout">%d %-5p [%c] %m%n</attribute> --> <!-- | The rollover period for this monitor's log file. Valid values are | MONTH, WEEK, DAY, HALFDAY, HOUR, MINUTE (case insensitive). This | attributes is *not* required, and the default value is DAY. --> <attribute name="RolloverPeriod">DAY</attribute> <!-- | The period to delay in between monitoring snapshots (in milliseconds). --> <attribute name="MonitorPeriod">10000</attribute> <!-- | The list of objects (MBeans) and their corresponding attributes to be | monitored. | | This parameter is specified as a XML fragment as follows: | | <attribute name="MonitoredObjects"> | <configuration> | <monitoredmbean name="[object name]" | logger="[logger name]"> | <attribute>[an attribute name]</attribute> | <attribute>[an attribute name]</attribute> | ... | </monitoredmbean> | </configuration> | </attribute> --> <attribute name="MonitoredObjects"> <configuration> <monitoredmbean name="jboss.system:type=ServerInfo" logger="jvm.threads"> <attribute>ActiveThreadCount</attribute> </monitoredmbean> <monitoredmbean name="jboss.system:type=ServerInfo" logger="jvm.heap"> <attribute>FreeMemory</attribute> <attribute>TotalMemory</attribute> <attribute>MaxMemory</attribute> </monitoredmbean> </configuration> </attribute> <!-- | Since this logging monitor only depends upon the ServerInfo MBean, a | non-service MBean, no dependancies can be specified. --> <!-- <depends>jboss.system:type=ServerInfo</depends> --> </mbean> </server>
Comments