To monitor Tomcat with Munin 2.0 on Debian GNU/Linux (tested on Debian Squeeze with Tomcat6 and Debian Backports), you need the following steps.
First, you need to install package tomcat6-admin which enables the Tomcat Manager app we will be using.
# apt-get install tomcat6-admin
Next, create a user with a manager role in Tomcat, editing /etc/tomcat6/tomcat-users.xml and adding the following two lines in the appropriate list.
<user username=”munin” password=”Munin” roles=”manager”/>
Restart Tomcat to reread its configuration and enable the newly-installed Tomcat Manager app.
# service tomcat6 restart
Configure the Munin tomcat_* plugins adding a file /etc/munin/plugin-conf.d/tomcat with the following content:
Enable the tomcat_* plugins:
# cd /etc/munin/plugins/; ln -s /usr/share/munin/plugins/tomcat_* .
Restart Munin node:
# service munin-node restart
Today we had a server stalled on “Loading kernel modules” at reboot (after adding 12GB of RAM, to 24GB total). The datacenter didn’t know what to do and they put us on a 32-bit rescue mode console from which we couldn’t (obviously) launch a 64bit chroot to update the kernel. The situation seemed pretty desperate.
Our sysadmin, Jérôme, once again came to the rescue. Waiting for the datacenter to respond would have potentially increased reboot time up to 45 minutes. The only possible thing to do: replace initrd with a similar version (just in case the first one would have been damaged). Luckily, we had another similar machine which had been installed the sameday (at 1h difference), so we copied the initrd image over and launched a reboot. After 5 long (never-ending) minutes of no response from the server, it just popped back online.
That’s another one to remember for sysadmin’s day!