Collectd Front-ends

Finally, I found a good enough Collectd front-end: the Collectd Graph Panel (CGP). But first lets look at those front-ends which did not pass the exam:

  • Collectd-web is the first I tried, maybe because it is the only one with a package in Gentoo (but it is poor package, so I ended up installing from source). My main complain is that some graphs, like the very useful context-switches, don’t work. It is also quite slow generating the graphs.
  • Collection4, developed by the lead developer of collectd, did not even build. I did not insist.

Many of the front-ends listed in the collectd wiki page were discarded either because they looked like dead (no new commit in the last few years) or because their deployment process was too cumbersome (need to setup database…). But I still tried a few more:

  • Sickmuse is sleek. However there are some details in the way to deployment, like there is no option to make server to listen only the local interface. Alright, it’s just Python, I can fix it… Problem is, the build process requires to install npm (the Node.js package manager), just to install another package manager named Bower, just to install the JS and CSS.
  • Jarmon is very simple to deploy but requires to define every plugin in the front-end, i.e. it is unable to discover the hosts and plugins just like every other front-end does. So it is a pain in the ass to maintain.
  • Visage just shows nothing. I tried to add a host and plugins through the web interface, but the interface is buggy.

Like when looking for the keys, the answer was in the last pocket. Well, the CGP web site is designed to discourage potential users. There is no documentation. I had to dig a little to find out how to get it working with Nginx for instance.

Just one note about CGP, it has two modes to generate the graphs: PNG (the default) and canvas, to generate the graphs in the browser. The canvas mode did not work for me: zooming with the mouse scroll is so sensible it is unusable; it is slow, the fan in my notebook started to run like crazy; my browser even gave me some error like “This scripts is stalled, kill it?”. But the PNG mode is fine.

Conclusion. The weakness of Collectd is the lack of a good and well established front-end. Instead there are more than a dozen front-ends of varying quality. This is my selection:

  1. CGP. Don’t look any further, unless you have some free time.
  2. Visage. This one is promising, maybe I will try again once they get 3.0 out.
  3. Sickmuse. If it only was less trendy and more practical… Three things to improve: the build process, deployment and usability.

pygit2 0.19.0 released

Three months after the previous release I am happy to present a new major version of pygit2, the Python bindings for the libgit2 library. Follows a summary with the changes.

API changes:

  • New Oid type
  • Changed signature of Repository.create_reference
  • Reference.oid and Reference.hex removed, use Reference.target instead
  • Drop del Index[path] from the API, use Index.remove(path) instead
  • Drop TreeEntry.to_object
  • Changed signature of Repository.checkout
  • Repository.create_blob_from_file removed, use instead new methods
    Repository.create_blob_fromworkdir and
    Repository.create_blob_from_disk

New features:

  • Add len(TreeBuilder) and TreeBuilder.get
  • Add Repository.merge_base
  • Support changing the head with Repository.head = refname
  • Improved support for diff
  • Add support for clone
  • Python 2: Support hex oids as byte strings
  • Add Reference.get_object
  • Add Remote.save
  • Add support for branches, new type Branch

Other:

  • Upgraded to libgit2 0.19
  • Partial documentation review

Fourteen developers have contributed to this release, including myself, and:

  • Nico von Geyso
  • Daniel Rodríguez Troitiño
  • Bernardo Heynemann
  • Rémi Duraffort
  • Andrey Devyatkin
  • Hervé Cauwelier
  • Jiunn Haur Lim
  • Richo Healey
  • Carlos Martín Nieto
  • David Fischer
  • Fraser Tweedale
  • Jun Omae
  • Xu Tao

Resources:

Enjoy!

Munin, how to reduce IO with rrdcached

Few weeks ago Munin was flooding me with message alerts about IO latency, read or write, going too high. Ironically it turned out Munin was the culprit. And the solution was to use rrdcached.

Lets see a Munin graph that shows pretty well the difference using rrdcached made:

sda-month

Around week 21, when I deployed this optimization, writes dropped quite a lot and reads stabilized.

Now follows the step-by-step guide to use rrdcached (with Gentoo).

Continue reading “Munin, how to reduce IO with rrdcached”

OVH: How to upgrade your kernel, if using Grub2

OVH, the hosting company where I have my dedicated serves, does some quality assurance on the Linux kernels, the ones it deploys on newly installed servers.

Now, after more than a year, there has been a new release. This is how upgraded the kernel on my Gentoo servers, which use Grub2:

# cd /boot
# wget ftp://ftp.ovh.net/made-in-ovh/bzImage/latest-production/bzImage-3.8.13-xxxx-grs-ipv6-64
# wget ftp://ftp.ovh.net/made-in-ovh/bzImage/latest-production/System.map-3.8.13-xxxx-grs-ipv6-64

# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/bzImage-3.8.13-xxxx-grs-ipv6-64
done

Then reboot…

If you use Grub2, regardless of the distribution, it should work the same.

Backup MX for Mailman, with Exim

This week a hard disk from one of my servers broke. It has been replaced with just 3 minutes of downtime (kudos to OVH), and right now the RAID array is being rebuilt.

Since this is the first time this happens to me, and the server is running a production mailman service, I decided to take my time and set-up a backup MX server. This is how I did it.

Remember that I am using a Gentoo distribution, this may be slightly different in other distro. Continue reading “Backup MX for Mailman, with Exim”

Gentoo: How to use Munin to monitor Mailman

Update 31/12/2012: Now this is a bit simpler, since bug 448414 has been fixed.

Before we start with the step-by-step procedure to get the mailman plug-in working, lets recall how to test a munin plug-in:

$ sudo munin-run mailman
posts.value 24
members.value 21892

The output above is what you should get once the mailman plug-in is correctly set-up. Continue reading “Gentoo: How to use Munin to monitor Mailman”

Gentoo: How to debug Exim

If you have some problem with exim, and the logs are not enough, edit the /etc/conf.d/exim file, and add the debugging option (-d):

/etc/conf.d/exim
# Command-line options for running exim
EXIM_OPTS="-bd -q15m -d"

Then restart exim:

# /etc/init.d/exim restart

The exim daemon will not be detached from the console, the debug information will be printed to the standard output. Good luck!

pygit2 v0.17.3 released

This should be the last release in the v0.17 series. The master branch has already been moved to be based in the libgit2’s development branch.

New in v0.17.3:

  • New Blob.size getter
  • New Repository.create_blob_fromfile method
  • Signature, now the time and offset parameters are optional
  • Improved diff support
  • Add pygit2.__version__
  • Optimize usage of Travis
  • Various fixes for the unit tests
  • Various documentation improvements

Thanks to Alex Chamberlain, Carlos Martín Nieto, Eric Davis, Eric Schrijver, Petr Viktorin, Ridge Kennedy and W. Trevor King.

CSS: Sticky footer

If you look around for a technique to get the footer stick to the bottom of the web page, you will find many variants on same theme (using absolute positioning, etc.). All have the same problem: the footer has fixed height, it does not grow with its content.

But there is one way to get a sticky footer of variable height, which is by the way much simpler than the other techniques. It involves using CSS tables. And here it is:

http://pixelsvsbytes.com/blog/2011/09/sticky-css-footers-the-flexible-way/

Have a nice read.

ikaaro 0.75 released

Almost two years have passed since the previous major release of the ikaaro web framework, and the itools library. The new release has tons of changes, so many I will not try to list them here.

This release is used by BePatient and some intranets.

I have labelled this release as beta, because the code to upgrade from the previous major release (0.62) is missing. Though, this is probably unfair since this version is already being used in production, and it is recommended to use it for new projects.