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
In Ubuntu, the shipped Firefox 15 comes with the new embedded HTML5 PDF reader disabled.
It is easy to enable though.
Go to “about:config”, search on “pdf” and switch the “pdfjs.disabled” entry to “false”.
Restart Firefox and test it pointing to some PDF URL.
In case it does not work, have a look at the “Portable Document Format (PDF)” type to action association in “Edit->Preferences->Applications” and set it to the internal Firefox preview.
Munin 2.0 has been released and packaged for Debian, and even backported to Squeeze (from backports.debian.org).
Even though there are still some quirks in this version (or just the Debian packaging), it is far better (more scalable, more powerful and prettier) than version 1.4.
Basically, the following article should cover it all: http://munin-monitoring.org/wiki/CgiHowto2, but doesn’t quite achieve it, so far.
Let’s see together how to install it successfully on Debian Squeeze. I will however not cover the agent (Munin Node), as there is no significant difference between basic installation of its 1.4 and 2.0 versions.
As a first significant performance improvement, Munin is now able to use RRDcached (it fairly reduces the disk I/O pressure on RRD files), and it is fairly easy to setup. Just install package rrdcached (who would have guessed?), then add the following options to OPTS in /etc/default/rrdcached:
OPTS="-s munin -l unix:/var/run/rrdcached.sock -b /var/lib/munin/ -B -j /var/lib/munin/journal/ -F"
This will override its defaults. And of course, restart then the daemon.
Adapt /etc/munin/apache.conf to your likings, in this case, we are going to uncomment all cgi and fastcgi-related blocks.
Install packages libapache2-mod-fcgid and spawn-fcgi, then download the following script and install it as an initscript on your system (e.g. as /etc/init.d/spaw-fcgi-munin-graph and running insserv):
http://files.julienschmidt.com/public/cfg/munin/spawn-fcgi-munin-graph (though this version is still buggy and quite fragile, contact me for a slightly improved version)
apt-get install libapache2-mod-fcgid spawn-fcgi
Add user munin and www-data to group adm, and allow group adm to write to /var/log/munin/munin*-cgi-*.log:
adduser munin adm adduser www-data adm chmod g+w /var/log/munin/munin*-cgi-*.log
Add user www-data to group munin and the opposite:
adduser www-data munin; adduser munin www-data
Start the spawn-fcgi-munin-graph service and check it is indeed running.
Enable the fcgid and rewrite Apache modules and restart the Apache2 service.
Customize /etc/munin/munin.conf to your likings, enabling the (Fast)CGI parts.
Whenever monitoring more than a single host, I recommend moving (i.e. commenting and copying) the localhost definition to some new /etc/munin/munin-conf.d/ file per domain (e.g. beeznest.conf), and add your hosts there, with a meaningful domain name.
Due to a licensing issue, the PHP bindings for Xapian were removed from Debian Squeeze. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513796 for more information about this.
Though, it is not really hard to build your own package from source.
Here is how:
sudo apt-get build-dep xapian-bindings sudo apt-get install php5-dev php5-cli apt-get source xapian-bindings cd xapian-bindings-1.2.* rm debian/control env PHP_VERSIONS=5 debian/rules maint debuild -e PHP_VERSIONS=5 -us -uc cd .. sudo dpkg -i php5-xapian_*.deb
Be careful: the extracted source directory (xapian-bindings-1.2.*) has to be absolutely clean, so if you tried a first time and it failed, remove the whole directory before trying again.
Of course, the same procedure holds true for Ubuntu as well.
2012-12-23 edit: if you’re using PHP 5.4, you need to modify the debuild line. Check the update article on Xapian’s wiki
To enable the extension, don’t forget to create a xapian.ini (or 20-xapian.ini for the latest Ubuntu with PHP 5.4) containing “extension = xapian.so” in /etc/php5/apache2/conf.d/, then restart your web server.
Many new videoconference systems nowadays are Flash-based. Of course, the main input for them is some sort of video device (e.g. a webcam).
Under Linux, the framework responsible for this is Video4Linux (V4L), of which version 2 (aka V4L2) is current. That means that most recent webcams drivers are supported only by V4L2.
Alas, some proprietary editors (of which Skype and Adobe with Flash) still only support V4L1. If you’ve got a webcam with V4L2-only driver, you’re out of luck.
Recently, Adobe announced, Flash’s support of V4L2 on Linux beginning with 10 Beta, but they got something wrong. On my Philips SPC 315NC as an example, it is detected (in Flash’s Settings), but does not work (not activated), while it works perfectly with other programs (of which Cheese). On my Logitech QuickCam Express, it is not even detected by Flash.
Some complicated solutions are available on the Net, some based on some Gstreamer loopback-conversion from V4L2 to V4L1. Example: http://www.jtolds.com/newsletter/2008/7/27/how-to-get-v4l2-devices-to-work-with-flash
Though, there is a simpler solution I just found out: V4L2 is shipped with a compatibility-layer library. On my Ubuntu, it is to be found in /usr/lib/libv4l/v4l1compat.so.
So, using the mechanism to force loading this library, you will get your V4L2 webcam supported by Flash in your browser.
Example with Firefox:
And of course, probably any other software suffering the same kind of flaw.
This howto describes how to rename a Munin 1.4.x node and/or move it to another domain without losing history, because just renaming the node in /etc/munin/munin.conf will actually just create a new host. It has been tested on Debian Squeeze (would work on Debian Lenny too, at least when using 1.4 backports). You will need at least a basic understanding of how to configure Munin to use it.
- Stop the cronjob (rename the /etc/cron.d/munin to something with a dot in the name, e.g: /etc/cron.d/munin.disabled)
- Rename the RRD files. The following command does the job (actually, moved the files by hand to the right directory after renaming them):
for file in /var/lib/munin/localdomain/*.rrd; do mv $file `echo $file|sed ‘s/localhost\.localdomain/saidhost\.example\.net/’`; done
- Edit /etc/munin/munin.conf to change the node name accordingly
- Enable back the cronjob (renaming /etc/cron.d/munin.disabled to /etc/cron.d/munin)
- Wait at least 5 minutes (the time for munin-update to run at least once)
- Depending on your setup (if you are using Munin’s CGI mode), you might need to update some file and/or directory permissions
- Go to the web interface to check the result
I’m used to gThumb to rename lots of pictures from camera’s filename to something including the date, hour taken and a sequence number, like this one: 2011-02-27–16.24.51_007.JPG.
Basically, simply select pictures you want to rename and press F2 (or Edit->Rename).
Previous to version 2.11, gThumb was using a vastly simpler syntax expression for renaming (they name it Template in the Rename dialog). With 2.11 and up, to get the same, I now have to use the following expression:
Please also note that when changing the Rename dialog, they also made it far slower for fair number of pictures (it might take minutes before the Rename dialog appears). For those who know me, I reported the bug in Launchpad as Pictures renaming slower.