Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It would be great if anyone can share a working configuration for the tomcat_ plugin of munin. I need to monitor several tomcat instances on one machine.

So far I can't figure out:

  • which are the available metrics for the tomcat_ plugin? (documentation is quite poor - at least what I've managed to find)
  • how to configure it correctly?
share|improve this question
up vote 8 down vote accepted

share my experiences,hope it helps

step1: enable tomcat plugins

sudo ln -s /usr/share/munin/plugins/tomcat_access /etc/munin/plugins/tomcat_access
sudo ln -s /usr/share/munin/plugins/tomcat_jvm /etc/munin/plugins/tomcat_jvm
sudo ln -s /usr/share/munin/plugins/tomcat_threads /etc/munin/plugins/tomcat_threads
sudo ln -s /usr/share/munin/plugins/tomcat_volume /etc/munin/plugins/tomcat_volume

step2: config tomcat manager status page where the plugin read info from

edit tomcat-users.xml and add

<user username="munin" password="munin" roles="manager"/>
<role rolename="manager"/>

access http://munin:munin@localhost:8080/manager/status?XML=true to see if it works. check official document for details:Manager App HOW-TO

step3: config tomcat plugins

edit /etc/munin/plugin-conf.d/munin-node and add

env.ports 8080
env.user munin
env.password munin

step4: local check

run and check messages.


normally you need install simple xml support,

sudo apt-get install libxml-simple-perl
sudo yum install perl-XML-Simple

step5: update munin node

sudo /etc/init.d/munin-node restart

check you graphics, it should works.

share|improve this answer
Thank you for the instructions, I still hadn't the chance to check it out and verify your answer, but I'll mark the question as answered. If problems appear, I'll add to the discussion. – Vladimir Tsvetkov Jan 11 '12 at 11:28
Perfect for me. Thank you – Collin Peters May 7 '12 at 21:42
You shouldn't run munin plug-ins that way. Instead, use the provided command, as in munin-run tomcat_jvm, so you will also check that munin configuration for finding and running your plug-in is correct. – eppesuig Jan 25 '15 at 23:10

First, it's a great answer! However, when you mention manually running and checking using "/etc/munin/plugins/tomcat_jvm," this doesn't pick up the environment variables from /etc/munin/plugin-conf.d/munin-node (i.e. user/password), so it fails. The correct way is to use munin-run:

$ sudo /etc/munin/plugins/tomcat_jvm
free.value U
used.value U
max.value U

$ sudo munin-run tomcat_jvm
free.value 13894584
used.value 40762440
max.value 1073741824

Also, I'm running Tomcat 7 and some of the tomcat plugins expect connectors with the name of the form http-${PORT} but my connectors are of the form http-apr-${PORT} so I also needed to add this to the [tomcat_*] stanza of munin-node:

env.connector "http-apr-8081"
share|improve this answer

My reputation doesn't allow commenting, but correct env.connector is crucial for other plugins than tomcat_jvm. In my case I needed to drop quotation marks ("), i.e.

 env.connector jk-

If you can't find the correct connector name, try either

$ lynx http://localhost:8080/manager/html


$ curl http://localhost:8080/manager/status?XML=true -u munin:munin | grep connector

Also note, that in tomcat 6.0.30 or later, the roles for manager are more fine-grained. I haven't yet tried myself, but according to the documentation role manager-status in tomcat-users.xml should work in this case.

share|improve this answer

protected by Michael Hampton Aug 31 '15 at 21:07

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.