I grabbed the tomcat plugins from Ticket #74 for munin, specifically tomcat-plugins.tar.2.gz. I then made small changes to the URL and xml lines to work with our jboss install.
-my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://%s:%s\@127.0.0.1:%d/manager/status?XML=true"; +my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://%s:%s\@127.0.0.1:%d/status?XML=true"; -if($xml->{'connector'}->{'http'.$PORT}->{'requestInfo'}->{'bytesSent'}) { - print "volume.value " . $xml->{'connector'}->{'http'.$PORT}->{'requestInfo'}->{'bytesSent'} . "\n"; +if($xml->{'connector'}->{'http-0.0.0.0-'.$PORT}->{'requestInfo'}->{'bytesSent'}) { + print "volume.value " . $xml->{'connector'}->{'http-0.0.0.0-'.$PORT}->{'requestInfo'}->{'bytesSent'} . "\n";
Do this for each xml entry and you’ll be all set:
$ for file in `ls` ; do ./$file ; done accesses.value 550 free.value 201360024 used.value 317947240 max.value 1037959168 busy.value 4 idle.value 5 volume.value 4574821
Nice post!
Just a note though, when modifying default ROOT.war, use the following line instead:
my $URL = exists $ENV{‘url’} ? $ENV{‘url’} : “http://%s:%s\@127.0.0.1:%d/web-console/status?XML=true”;
for file in *; do ./$file; done
No need for `ls`
🙂
Hi thank you for this article
I got these errors:
2012/01/20-10:35:03 [19576] File does not exist: at /etc/munin/plugins/jboss_volume line 126
2012/01/20-10:35:03 [19576] Service ‘jboss_volume’ exited with status 2/0.
2012/01/20-10:35:05 [19518] Error output from jboss_threads:
2012/01/20-10:35:05 [19518] File does not exist: at /etc/munin/plugins/jboss_threads line 107
2012/01/20-10:35:05 [19518] Service ‘jboss_threads’ exited with status 2/0.
2012/01/20-10:35:06 [19576] Error output from jboss_threads:
2012/01/20-10:35:06 [19576] File does not exist: at /etc/munin/plugins/jboss_threads line 107
2012/01/20-10:35:06 [19576] Service ‘jboss_threads’ exited with status 2/0.
2012/01/20-10:35:06 [19518] Error output from jboss_access:
2012/01/20-10:35:06 [19518] File does not exist: at /etc/munin/plugins/jboss_access line 106
2012/01/20-10:35:06 [19518] Service ‘jboss_access’ exited with status 2/0.
2012/01/20-10:35:06 [19576] Error output from jboss_access:
2012/01/20-10:35:06 [19576] File does not exist: at /etc/munin/plugins/jboss_access line 106
2012/01/20-10:35:06 [19576] Service ‘jboss_access’ exited with status 2/0.
2012/01/20-10:35:10 [19576] Error output from jboss_jvm:
2012/01/20-10:35:10 [19576] File does not exist: at /etc/munin/plugins/jboss_jvm line 120
2012/01/20-10:35:10 [19576] Service ‘jboss_jvm’ exited with status 2/0.
at:
my $xml = $xs->XMLin($response->content, %options);
any idea ?
Working fine thank’s
Can you please help me I get this result;
2012/05/08-11:00:08 [22593] Error output from tomcat_access:
2012/05/08-11:00:08 [22593] File does not exist: at /etc/munin/plugins/tomcat_access line 106
2012/05/08-11:00:08 [22593] Service ‘tomcat_access’ exited with status 2/0.
2012/05/08-11:00:08 [22593] Error output from tomcat_jvm:
2012/05/08-11:00:08 [22593] File does not exist: at /etc/munin/plugins/tomcat_jvm line 120
2012/05/08-11:00:08 [22593] Service ‘tomcat_jvm’ exited with status 2/0.
2012/05/08-11:00:08 [22593] Error output from tomcat_threads:
2012/05/08-11:00:08 [22593] File does not exist: at /etc/munin/plugins/tomcat_threads line 107
2012/05/08-11:00:08 [22593] Service ‘tomcat_threads’ exited with status 2/0.
2012/05/08-11:00:08 [22593] Error output from tomcat_volume:
2012/05/08-11:00:08 [22593] File does not exist: at /etc/munin/plugins/tomcat_volume line 127
2012/05/08-11:00:08 [22593] Service ‘tomcat_volume’ exited with status 2/0.
2012/05/08-11:00:09 [22593] Error output from tomcatstats:
2012/05/08-11:00:09 [22593] EXCEPTION: mismatched tag: line 1, column 989
2012/05/08-11:00:09 [22593] Service ‘tomcatstats’ exited with status 1/0.
2012/05/08-11:00:09 [22593] Error output from tomcatstats:
2012/05/08-11:00:09 [22593] EXCEPTION: mismatched tag: line 1, column 989
2012/05/08-11:00:09 [22593] Service ‘tomcatstats’ exited with status 1/0.
2012/05/08-11:00:10 [22593] Error output from yum:
2012/05/08-11:00:10 [22593] Can’t open /var/lib/munin/plugin-state/yum.state for reading: No such file or directory
2012/05/08-11:00:10 [22593] Please read ‘munindoc yum’ to understand why if the file does not exist.
2012/05/08-11:00:10 [22593] Service ‘yum’ exited with status 2/0.
Sorry for hijacking this old thread but I just released a Munin plugin for JBoss that can be of interest. It out-of-the-box automatically provide a lot of measurements that can be of interest.
Documentation: https://github.com/AndersWelen/Buzz/wiki