Tomcat & JMX extensions
Moderators: Developers, Moderators
Tomcat & JMX extensions
Good afternoon,
I would like to know whether or not Cacti can be used to gather JMX based information on the internals of a Tomcat server.
I have seen a couple of posts regarding overall response times (assuming through HTTP GETS), but would like to gather more detailed statistics that can be established through JMX.
Any assistance would be greatly appreciated.
Thanks in advance.
I would like to know whether or not Cacti can be used to gather JMX based information on the internals of a Tomcat server.
I have seen a couple of posts regarding overall response times (assuming through HTTP GETS), but would like to gather more detailed statistics that can be established through JMX.
Any assistance would be greatly appreciated.
Thanks in advance.
Steve Whatmore
Technical Lead Web Development
Sigma Software Solutions
55 York St., Suite 1100
Toronto, ON
M5J 1R7
Phone: 416.368.2000 x2293
Email: stevenw@sigmasoft.ca
MSN: steven.whatmore@hotmail.com
Web: www.sigmasoft.ca
Skype: steven.whatmore
Technical Lead Web Development
Sigma Software Solutions
55 York St., Suite 1100
Toronto, ON
M5J 1R7
Phone: 416.368.2000 x2293
Email: stevenw@sigmasoft.ca
MSN: steven.whatmore@hotmail.com
Web: www.sigmasoft.ca
Skype: steven.whatmore
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
If you can write a script to gather the information, then Cacti can graph it.
It's simply as that.
The complex part might be writing the script.
It's simply as that.
The complex part might be writing the script.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Tomcat & JMX extensions
If you make any progress in this, I'd would be very interested about your findings. If you have problems putting your data into cacti, I will help. But for this I would need the structure of the data you want to put into cactiWhatty wrote:Good afternoon,
I would like to know whether or not Cacti can be used to gather JMX based information on the internals of a Tomcat server.
I have seen a couple of posts regarding overall response times (assuming through HTTP GETS), but would like to gather more detailed statistics that can be established through JMX.
Any assistance would be greatly appreciated.
Thanks in advance.
Reinhard
As far as I can tell, the easiest way to go about this would be to utilize a JMX SNMP agent extension.
Of course this unto itself would require further effort to determine how it would work.
Of course this unto itself would require further effort to determine how it would work.
Steve Whatmore
Technical Lead Web Development
Sigma Software Solutions
55 York St., Suite 1100
Toronto, ON
M5J 1R7
Phone: 416.368.2000 x2293
Email: stevenw@sigmasoft.ca
MSN: steven.whatmore@hotmail.com
Web: www.sigmasoft.ca
Skype: steven.whatmore
Technical Lead Web Development
Sigma Software Solutions
55 York St., Suite 1100
Toronto, ON
M5J 1R7
Phone: 416.368.2000 x2293
Email: stevenw@sigmasoft.ca
MSN: steven.whatmore@hotmail.com
Web: www.sigmasoft.ca
Skype: steven.whatmore
- inetquestion
- Cacti User
- Posts: 67
- Joined: Wed Feb 01, 2006 11:13 am
- Location: Charlotte NC
Tomcat with JMX
Has anyone made any progress on this front?
maybe you can look into: http://forums.cacti.net/viewtopic.php?t ... sc&start=0
we wrote some tomcat scripts our self. for that we used the jmxproxy Servlet.
for example with perl you can do:
#!/usr/bin/perl
#
#
use strict;
use LWP::Simple;
my $host = shift;
my $username = shift;
my $password = shift;
my $MBean = shift;
my $url = 'http://' . $username . ':' . $password .'@' . $host . '/manager/jmxproxy/?qry= . $MBean;
The Output is nearly cacti compatible. If you dont specify an qry Parameter you get a full list. You can use every Name from this List to specify the Query, if you want multiple MBeans you can use an '*'
we wrote some tomcat scripts our self. for that we used the jmxproxy Servlet.
for example with perl you can do:
#!/usr/bin/perl
#
#
use strict;
use LWP::Simple;
my $host = shift;
my $username = shift;
my $password = shift;
my $MBean = shift;
my $url = 'http://' . $username . ':' . $password .'@' . $host . '/manager/jmxproxy/?qry= . $MBean;
The Output is nearly cacti compatible. If you dont specify an qry Parameter you get a full list. You can use every Name from this List to specify the Query, if you want multiple MBeans you can use an '*'
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
jmx4perl
FYI, there is a package called jmx4perl
(http://search.cpan.org/~roland/jmx4perl/) which might be of
interest for those needing a JMX integration with Cacti. This package
allows for scripting JMX access to remote Java application servers without
the need of a locally installed Java runtime environment (behind the
scenes this is done with JSON over HTTP). You need to install a small
(<100k) agent servlet on the app server, though.
The distribution includes a Nagios Plugin which can serve as a good
example for how to use JMX::Jmx4Perl programmatically. The
documentation is not that bad, too.
If you need some help for integrating JMX::Jmx4Perl for Cacti (which I
use myself and really like), don't hesitate to ask.
roland (author of jmx4perl)
And, yes, sorry for the plug. But I thought it might be of interest for you
(http://search.cpan.org/~roland/jmx4perl/) which might be of
interest for those needing a JMX integration with Cacti. This package
allows for scripting JMX access to remote Java application servers without
the need of a locally installed Java runtime environment (behind the
scenes this is done with JSON over HTTP). You need to install a small
(<100k) agent servlet on the app server, though.
The distribution includes a Nagios Plugin which can serve as a good
example for how to use JMX::Jmx4Perl programmatically. The
documentation is not that bad, too.
If you need some help for integrating JMX::Jmx4Perl for Cacti (which I
use myself and really like), don't hesitate to ask.
roland (author of jmx4perl)
And, yes, sorry for the plug. But I thought it might be of interest for you
Cacti/JMX4Perl module?
Roland,
You mentioned that you use Cacti with JMX4Perl. Do you have an example script you could share?
Best,
Dave
You mentioned that you use Cacti with JMX4Perl. Do you have an example script you could share?
Best,
Dave
Re: Cacti/JMX4Perl module?
Dabe,
roland.
Actually, there is no cacti script within the jmx4perl distribution (but it is planned). But you can refer to http://forums.cacti.net/post-197459.html which is a nice howto for using jmx4perl with cacti.davetbo wrote: You mentioned that you use Cacti with JMX4Perl. Do you have an example script you could share?
roland.
RE: Tomcat & JMX Extensions
Thanks for the quick reply, Roland. I will check that out!
Dave
Dave
Who is online
Users browsing this forum: No registered users and 3 guests