Monitoring AEM part 1
August 8, 2016 Leave a comment
Adobe AEM and CQ provides a wealth of data to monitor and with recent edition provides monitoring pages on the individual instances. However, if you are an administrator with hundreds (or thousands of servers), or in the service industry case AEM instances, it is not practical to log in to the individual server to monitor them and proactive monitors are necessary. Having a repeatedly deployable monitoring solution that integrates with your existing alerting system is key, so here is the simple mechanism to do so within AEM.
JMX mbeans. Thats it, no special secret or sauce required. AEM provides all of the metrics that you can monitor within the application as exposed mbeans. simply start your instance with rmi flags to enable monitoring
-Dcom.sun.management.jmxremote.port=8001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost
for instance will allow the localhost instance to monitor the solution. Do not allow non-localhost connections without proper authentication.
to get a feel for what metrics are available to you pull down jmxterm and run it as in the following example.
$ wget http://downloads.sourceforge.net/cyclops-group/jmxterm-1.0-alpha-4-uber.jar
$ java -jar jmxterm-1.0-alpha-4-uber.jar
$ open localhost:8001
$ beans
$ info -b com.adobe.granite.replication:id="flush",type=agent
$ get -b com.adobe.granite.replication:id="flush",type=agent QueueBlocked
In the example above, you will see all the mbeans available for AEM, then what attributes are available for the replication agent flush and finally whether that queue is blocked (a common admin responsibility for AEM).
So what is next? repeatability, scalability, trending and integration are key to successfully deploying this and ensuring that config management tasks can deploy the solution. There are challenges with most of the OTS RMI/JMXmbean monitors out there. Specifically the interpretation of booleans and Java primitives that AEM uses.
I plan to cover how I collect, store, dashboard and alert on AEM metrics in the future and most of it is applicable to any application, but if you can’t wait for future updates leave a message in the comments and I will get back to you.