A Monitoring System for Activemq 5.3
Total Page:16
File Type:pdf, Size:1020Kb
ActiveMQ Monitor A Monitoring System For ActiveMQ 5.3 User Guide Total Transaction Management, LLC 570 Rancheros Drive, Suite 140 San Marcos, CA 92069 760-591-0273 www.ttmsolutions.com Copyright 2009, Total Transaction Management www.ttmsolutions.com Revision 2.0.0 ActiveMQ Monitor i Table of Contents 1 INTRODUCTION .............................................................................................................................................. 1 2 ACTIVEMQ’S DEFAULT ADVISORY SYSTEM ..................................................................................................... 1 3 THE AMON MONITORING SYSTEM ................................................................................................................. 2 3.1 MONLET CONTAINER ........................................................................................................................................... 2 3.1.1 The AMon Plugin Module....................................................................................................................... 3 3.1.2 The Monitoring Expression Language (MEL) ......................................................................................... 5 3.1.3 Apache Camel ........................................................................................................................................ 7 3.2 SNMP AGENT AND MIB ..................................................................................................................................... 8 4 THE ANATOMY OF A MONLET ........................................................................................................................ 8 4.1 THE BASICS........................................................................................................................................................ 8 4.2 A DUMMY MONLET ............................................................................................................................................ 9 4.3 SENDING AMON EVENTS TO A SEDA QUEUE .......................................................................................................... 10 4.4 USING THE MEL ............................................................................................................................................... 11 4.5 MONITORING THE SIZE OF AN ACTIVEMQ QUEUE .................................................................................................. 16 4.6 A MONLET THAT SENDS SNMP NOTIFICATIONS ..................................................................................................... 22 4.7 COMPILING YOUR MONLETS ............................................................................................................................... 24 4.8 A WARNING .................................................................................................................................................... 24 5 THE MEL ....................................................................................................................................................... 24 5.1 EVENT TYPES AS CONSTANTS .............................................................................................................................. 25 5.2 VARIABLES ....................................................................................................................................................... 26 5.3 METHODS ....................................................................................................................................................... 35 5.4 ASYNCHRONOUS PROCESSING ............................................................................................................................. 37 6 THE INTERVAL TIMER ................................................................................................................................... 37 7 SNMP CAMEL ENDPOINT .............................................................................................................................. 38 7.1 SNMP LOGGINGNOTIFICATION ........................................................................................................................... 38 7.2 SNMP MONITORNOTIFICATION.......................................................................................................................... 41 8 JMX CAMEL NOTIFICATION ENDPOINT ......................................................................................................... 44 9 INSTALLING AMON ....................................................................................................................................... 48 9.1 INSTALLING THE AMON FILES .............................................................................................................................. 48 9.2 LOADING AMON INTO THE ACTIVEMQ MESSAGE BROKER ....................................................................................... 48 9.3 LOADING YOUR MONLETS INTO THE ACTIVEMQ MESSAGE BROKER ........................................................................... 50 9.4 EXAMPLE MONLETS .......................................................................................................................................... 53 10 CONFIGURING AMON ............................................................................................................................... 53 10.1 PROPERTIES FILE ............................................................................................................................................... 53 10.2 JMX CLIENT .................................................................................................................................................... 57 10.3 LOG4J MONITORING ......................................................................................................................................... 57 10.4 SNMP AGENT ................................................................................................................................................. 58 10.4.1 SNMP Notifications .............................................................................................................................. 61 11 THE MANAGEMENT CONSOLE .................................................................................................................. 62 12 VIRTUALMACHINE OBJECT ....................................................................................................................... 62 Copyright 2009, Total Transaction Management www.ttmsolutions.com getDaemonThreadCount ..................................................................................................................................... 63 getTotalStartedThreadCount ............................................................................................................................... 63 getPeakThreadCount ........................................................................................................................................... 63 getThreadCount ................................................................................................................................................... 63 getUsedHeapMemory .......................................................................................................................................... 63 getMaxHeapMemory........................................................................................................................................... 63 getCommittedHeapMemory ................................................................................................................................ 63 getInitHeapMemory ............................................................................................................................................ 63 getUsedNonHeapMemory ................................................................................................................................... 64 getMaxNonHeapMemory .................................................................................................................................... 64 getCommittedNonHeapMemory ......................................................................................................................... 64 getInitNonHeapMemory ...................................................................................................................................... 64 getUptime ............................................................................................................................................................ 64 getStartTime ........................................................................................................................................................ 64 getFreeMemory ................................................................................................................................................... 64 getTotalMemory .................................................................................................................................................. 64 getMaxMemory ................................................................................................................................................... 65 getSpecificationVersion ....................................................................................................................................... 65 getSpecName ......................................................................................................................................................