Archive for December, 2008

munin: migration from a 32bit to a 64bit host

When you migration your munin from a 32bits to a 64bits installation, you have to dump restore all your rrd files. Saying that looks like a pain, but in fact, it is easy to do ;-) . We migrate some months ago our munin/nagios server at work from an old 32bits server to a brand new rack server using a 64bit Ubuntu 8.04.1, we performed the following scripts and kept our historic.

Here are the two scripts (you need some disk space to perform the dump / restore) . I assume you have copied the content of you “old” server on the new server. On Ubuntu/Debian servers, rrd files usually lives in /var/lib/munin.

First dump script :

#!/bin/bash
for f in `find /var/lib/munin -name '*.rrd' -print` ; do
    xml_file=`dirname $f`/`basename $f .rrd`.xml
   rrdtool dump "$f" > "${xml_file}"
   chown root:root "${xml_file}"
done

Import script :

#!/bin/bash
for f in `find /var/lib/munin -name '*.xml' -print` ; do
   rrd_file=`dirname $f`/`basename $f .xml`.rrd
   mv -f "${rrd_file}" "${rrd_file}.bak"
   chown root:root "${rrd_file}.bak"
   rrdtool restore "$f" "${rrd_file}"
   chown munin:munin "${rrd_file}"
done

, , ,

2 Comments

Using listadmin to manage mailman

I’m managing a bunch of mailman lists for work and out-of-work activities. The web interface of mailman is great, but sometimes, it is just slow to have to go through the web interface. It is unproductive when you have several pending messages and you have to go through all the queues. Hopefully, listadmin is there :)

Setup is easy on Ubuntu or Debian:

$ sudo apt-get install listadmin

Configuration is not really difficult. It is a file ~/.listadmin.ini, here is a sample configuration:

# lists.xxxxxx.com
adminurl https://lists.xxxxxx.com/admindb/{list}
password secret
dev@lists.xxxxxx.com
users@lists.xxxxx.com

Launching with the command line:

lionel@brehat:~$ listadmin lists.xxxxxx.fr
fetching data for dev@lists.xxxxxx.com ... nothing in queue
fetching data for users@lists.xxxxxx.com ...
[1/1] ============== users@lists.xxxxxxx.com =====================
From:     uaowiqemxjoije@mbit.ru
Subject:  Faire de l'argent en ligne - Plus de 500 euro/jour! ba
Reason:   Message avec destination implicite                   Spam? 0
Approve/Reject/Discard/Skip/view Body/Full/jump #/Undo/Help/Quit ? D
Submit changes? [yes] yes

By default, listadmin will go through all the lists in your configuration file. Note that you can have several lists on several hosts. You can limit to some list / host appending a list name or a regexp to the command line. In my example, I just limited to a host.

, , , , ,

1 Comment