On 5/15/2014 9:57 AM, Leon Rosenberg wrote:
Hello David,

I will not ask you why you are reinventing the wheel (ok, I lied, why are
you reinventing the wheel?).
You have multiple options available:
1) You could use jmx and publish your information as jmx beans.
2) You could use rmi between you 'collector' and the target apps.
3) You could use simple http (preferably json), but in that case I would
advice to setup a separate collector for it.

For any of the above options there are numbers of classes and utilities you
can use. For example jersey as jax-rs implementation is perfect for
exchange of json data, for rmi you could use DistributeMe (
http://www.distributeme.org) or spring-remote, and so on.

But yet again, why reinventing the wheel?

I'm not trying to. Your responses above are the exact kinds of information I was looking for: how to communicate between my app that displays the information, and the monitored apps.

Now I just need to look into how to use jmx, rmi and json to figure out which will serve my needs the best. My goal here is to be able to click on a browser bookmark and after logging in, have all the information from these dozen apps displayed in an organized table, so I don't have to do anything more than scroll down the page to see them all.

They are all OS-agnostic, I presume?

Thanks!



regards
Leon



On Wed, May 14, 2014 at 6:28 PM, David kerber <dcker...@verizon.net> wrote:

I am working on a small Tomcat servlet to monitor other tomcat-based
applications running on the same physical machine, and am trying to figure
out the best way to communicate between the monitoring app, and the
monitored apps.

My setup has several tomcat instances of a single application, each
running from its own directory, and listening on its own TCP port.  So
there is no direct communication between the instances.

I'm trying to monitor various data about the application, not about tomcat
itself or the JVM. So I want to collect such things as the number of
requests it has processed, the last data received, etc, and not things like
memory and cpu usage.  It is my app, so I can (and expect to need to) add
methods or servlets to return the information I want to collect.

My question is, what is the best way to make the request to get the data?
  Would  URL request from the monitoring app to the monitored app be
appropriate, and then parse the response out for display in a browser?  If
so, what java class is likely to be useful for this communication?  I will
have all the information needed to connect to the application instance
(server, port, etc), but want it to be portable across OS types.

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to