144 lines
5.3 KiB
XML
144 lines
5.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!-- $Id: monitoring-service.xml 46248 2006-07-13 15:03:17Z dimitris $ -->
|
|
|
|
<!-- ===================================================================== -->
|
|
<!-- -->
|
|
<!-- User Service Configuration -->
|
|
<!-- -->
|
|
<!-- ===================================================================== -->
|
|
|
|
<server>
|
|
|
|
<mbean code="org.jboss.monitor.alerts.ConsoleAlertListener"
|
|
name="jboss.alerts:service=ConsoleAlertListener">
|
|
<attribute name="MessageTemplate"><![CDATA[%(MONITOR_NAME) was triggered for attribute %(ATTRIBUTE).]]></attribute>
|
|
<attribute name="AlertName">Console Alert</attribute>
|
|
</mbean>
|
|
|
|
<!-- Enable after filling in correct to, from, and reply to
|
|
|
|
<mbean code="org.jboss.monitor.alerts.EmailAlertListener"
|
|
name="jboss.alerts:service=EmailAlertListener">
|
|
<depends>jboss:service=Mail</depends>
|
|
<attribute name="MessageTemplate"><![CDATA[%(MONITOR_NAME) was triggered for attribute %(ATTRIBUTE).]]></attribute>
|
|
<attribute name="AlertName">Email Alert</attribute>
|
|
<attribute name="To">somebody@somewhere.org</attribute>
|
|
<attribute name="From">noreply@nowhere.org</attribute>
|
|
<attribute name="ReplyTo">noreply@nowhere.org</attribute>
|
|
<attribute name="SubjectTemplate"><![CDATA[[jboss-alert] %(MONITOR_NAME)]]></attribute>
|
|
</mbean>
|
|
-->
|
|
|
|
<!--
|
|
Example of listening for notifications from JBoss monitors.
|
|
|
|
The SubscriptionList attribute provides the specification to which
|
|
MBeans to subscribe for notifications and for what notification types.
|
|
|
|
The DynamicSubscriptions attribute is used to indicate whether to monitor
|
|
the MBeanServer for new MBeans and subscribe to them if the subscription
|
|
specification matches.
|
|
|
|
The NotificationListener attribute can be set to indicate an external
|
|
MBean as the receiver of the Notifications.
|
|
|
|
The LogLevel attribute can be set to indicate the level to use for
|
|
logging the received notification, e.g. "WARN", "INFO", "DEBUG", etc.
|
|
-->
|
|
<!--
|
|
<mbean code="org.jboss.monitor.services.NotificationListener"
|
|
name="jboss.jmx:service=NotificationListener">
|
|
|
|
<attribute name="DynamicSubscriptions">true</attribute>
|
|
<attribute name="NotificationListener"></attribute>
|
|
<attribute name="SubscriptionList">
|
|
<subscription-list>
|
|
<mbean name="jboss.monitor:*">
|
|
<notification type="JBOSS_MONITOR_NOTIFICATION"/>
|
|
</mbean>
|
|
</subscription-list>
|
|
</attribute>
|
|
|
|
</mbean>
|
|
-->
|
|
|
|
<!--
|
|
MemoryMonitor monitors the free JVM memory and emits JMX Notifications
|
|
(org.jboss.monitor.alarm.AlarmNotification) when certain thresholds
|
|
are crossed.
|
|
|
|
The following attributes may be set:
|
|
|
|
FreeMemoryWarningThreshold
|
|
- e.g. 1048576, or 1000K, or 1M
|
|
FreeMemoryCriticalThreshold
|
|
- like above, must be lower
|
|
SamplingPeriod
|
|
- e.g. 5000, or 5sec.
|
|
TriggeringWarningMeasurements
|
|
- number of measurements in the warning area to trigger a notification
|
|
|
|
AlarmNotification carries alarmState and alarmSeverity.
|
|
alarmSeverity takes the values NORMAL, WARNING, CRITICAL for this monitor.
|
|
See org.jboss.monitor.alarm.Alarm
|
|
-->
|
|
<!--
|
|
<mbean code="org.jboss.monitor.services.MemoryMonitor"
|
|
name="jboss.monitor:service=MemoryMonitor">
|
|
|
|
<attribute name="FreeMemoryWarningThreshold">95M</attribute>
|
|
<attribute name="FreeMemoryCriticalThreshold">80M</attribute>
|
|
</mbean>
|
|
-->
|
|
|
|
<!--
|
|
Example of using the TimerService wrapper to configure a
|
|
javax.management.timer.Timer mbean, to produce heartbeat
|
|
notifications.
|
|
|
|
Attributes to configure:
|
|
|
|
NotificationType
|
|
- The type of the produced javax.management.timer.TimerNotification
|
|
Notification Message
|
|
- The string message to carry in the produced notification
|
|
Timer Period
|
|
- Every how often to emit notifications, e.g. 500msec, 10sec, 5min, 1h;
|
|
- a zero value will produce just one notification
|
|
Repeatitions
|
|
- How many timer notifications to emit when the period is not zero;
|
|
- a zero value produces infinite notifications
|
|
FixedRate
|
|
- Whether the periodic notification should be produced at
|
|
- FixedRate (true) or FixedDelay (false, default)
|
|
TimerMBean
|
|
- The ObjectName of the JMX Timer to configure, combined with a dependency
|
|
|
|
If you want to see/log the emitted notifications, you can configure
|
|
a NotificationListener as follows:
|
|
|
|
<mbean code="org.jboss.monitor.services.NotificationListener"
|
|
name="jboss.monitor:service=NotificationListener">
|
|
<attribute name="SubscriptionList">
|
|
<subscription-list>
|
|
<mbean name="jboss.monitor:name=Heartbeat,type=Timer"/>
|
|
</subscription-list>
|
|
</attribute>
|
|
</mbean>
|
|
-->
|
|
<!--
|
|
<mbean code="org.jboss.monitor.services.TimerService"
|
|
name="jboss.monitor:name=Heartbeat,type=TimerService">
|
|
<attribute name="NotificationType">jboss.monitor.heartbeat</attribute>
|
|
<attribute name="NotificationMessage">JBoss is alive!</attribute>
|
|
<attribute name="TimerPeriod">5sec</attribute>
|
|
<depends optional-attribute-name="TimerMBean">
|
|
<mbean code="javax.management.timer.Timer"
|
|
name="jboss.monitor:name=Heartbeat,type=Timer"/>
|
|
</depends>
|
|
</mbean>
|
|
-->
|
|
|
|
</server>
|