Friday, August 29, 2014

Get your own JMX metrics into Enterprise Manager - Part 2

Once you have an application with a custom registered MBean, we are able to both create incidents and monitor it from Enterprise Manager. Did you also know that there is an excellent WebLogic MBean browser as well?

Let's start by finding the MBean that we created in Part 1


Start logging into Enterprise Manager and go directly to the WebLogic server where you deployed your MBean application and start the MBean Browser


Navigate down and you should find the MBean that we just created with the name "Duke". You can edit the content of our name directly from the MBean browser.


With that we just made sure that the MBean is visible. Now let's start to monitor it. For Enterprise Manager to be able to handle our new MBean metric, we need to create a metric extension.


We did deploy our EAR file to a WebLogic server, but it is the same approach on JBoss, Tomcat, GlassFish and other servers.


Create a new Metric Extension


Next, we browse the MBean tree. (Hint: To be able to browse you need to have entered preferred credentials for the target)


Next, you are able to set properties on your new metric by pressing the EDIT button



Next, we are going to test our new metric on the target:




Then press Next, and Finish. We are now done creating our new metric. Now let us deploy it to the target (Agent). First we have to Save our new metric extension as a Deployable Draft


Afterwards we are able to target it to a server:


And the last step is to publish our new metric extension


That is it!

Now we are going to get input every 15 minutes on our new metric and we can browse to the target WebLogic server and have a look!



Let's try to change the value. It should give us a new incident in Enterprise Manager. Go to the MBean browser and change the name to e.g Tux


After some minutes, there should be a new incident created


This concludes the example. It is now up to you to create notifications rules etc. for your own JMX metrics.

No comments:

Post a Comment