-
Mar 2nd, 2009, 11:52 AM
#1
AMS not detecting exported beans
I'm trying to setup AMS to monitor our application. I've followed all the steps of the tutorials and AMS auto-discovers the application along with the Spring Application Context and the Spring Bean Factory.
However, any beans that I've set with the @ManagedResource attribute/@ManagedMetric attribute doesn't show up on the list.
Now when I connect via JConsole and goto the MBeans tab, I see that the ApplicationContext and BeanFactory show up under spring.application and all the classes that I've marked with @ManagedResource show up under the fully qualified package name.
Any help to point me in the right direction would be greatly appreciated.
Thanks.
-
Mar 3rd, 2009, 08:21 AM
#2
Does that mean that the @ManagedResources you are exporting do not have the domain "spring.application" in their ObjectNames? They must have that domain in order to be auto-discovered by AMS. In the future, we will be removing this restriction in favor of (most likely) a recognized key property value.
Thanks,
Jennifer
-
Mar 3rd, 2009, 08:29 AM
#3
Hello Jen,
Thanks for the reply. It would also be great if you could add this to the documentation.
I have changed the domain name of the @ManagedResource as follows:
@ManagedResource(objectName="spring.application:na me=MarketDataManager",description = "Market Data Manager")
and I still am unable to get AMS to auto-discover the bean. In fact, the auto-discovery of the Spring Application seems flaky.
Thanks.
-
Mar 3rd, 2009, 08:43 AM
#4
Hello,
The "source-level metadata type" section of https://www.covalent.net/resource/do...ith%20AMS.html (this file is also available in the doc directory of your AMS server) covers the expected format of the ObjectName. Looks like you are missing the "type" key property.
Also, what are you doing to trigger auto-discovery of your new MBeans? By default, AMS auto-discovers servers every 15 minutes, but new services within an existing server (such as ApplicationContext, BeanFactory, etc) are only auto-discovered once every 24 hours. You can change this interval in AMS_HOME/agent-2.0.0.RC1/agent.properties autoinventory.runtimeScan.interval.millis property. However, if you're still in the evaluation phase, the quickest way to trigger auto-discovery of services is to restart the agent.
-
Mar 12th, 2009, 02:17 PM
#5
Hello,
After reading the docs and this thread, I've been attempting to use SpringSource AMS v2.0.0.rc1 to manage a managed resource bean exported, via jmx, from a bundle in SpringSource dm server v1.0.1.RELEASE. I'm not entirely certain of the service type I'm looking for, but I can't find anything even close to my service. The annotation I'm using for my exported bean is as follows:
@ManagedResource(objectName = "spring.application:type=KeyGenerator,name=Armadil lo Key Generator",description="Generates keys")
and it shows up in JConsole under:
spring.application/KeyGenerator/Armadillo Key Generator
I've tried restarting the agent. Is there anything else I need to do? Do I need to write a plugin?
Thank you.
-
Mar 18th, 2009, 10:26 AM
#6
That should be enough to get your service discovered. I assume the agent has auto-discovered the dm Server, but your service just does not show up under the server's resource listing (it's a common misconception that new services will show up in the Auto-Discovery portlet - just want to make sure you are not expecting to see it there).
Can you post your agent.log (from AMS_HOME/agent.../logs)? Also, how are you using the bundle in dm Server (part of a PAR, shared services WAR, etc)? Lastly, does your MBean have any @ManagedAttributes, @ManagedOperations, or @ManagedMetrics?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules