Change munin Node Hostname

If you ever need to change the hostname of an existing munin node, and you want to retain the existing historical data, follow this procedure:

  • Disable or comment out the munin-cron job. On a RHEL or CentOS system, this is typically contained in /etc/cron.d/munin
  • Replace the existing hostname entry in munin.conf with the new hostname.
  • Rename the existing RRD sub-directory and files.

cd /var/lib/munin
mv oldhost newhost
cd newhost
rename oldhost newhost oldhost*.rrd

  • Remove the old HTML directory:

rm -rf /var/www/html/munin/oldhost

  • Enable or uncomment out the munin-cron job to restart the service.

Update 2/11/12: Stefan Schlesigner has posted a helpful script for performing this process.

Open Season for Open Source

Part of my day job is to keep an eye on the hardware and software market, and I am constantly reviewing opportunities to better meet our customers’ performance, cost and reliability goals.

I’ve always been a proponent of open-source technology, but I’m also a realist: if a more costly, proprietary solution is the only way to meet the performance scalability and reliability targets required by a business, it’s a simple decision. For a long-time, the only way for our legacy ERP application to scale was to roll it out on AIX on POWER. In recent years, however, increased pressure to cut costs, combined with increases in single-system scalability of the Linux platform have culminated into somewhat of a perfect storm for the industry.

Recently, we’ve been migrating many of our customers’ primary ERP servers from IBM AIX on POWER hardware backed by large fiber-channel arrays to Red Hat Enterprise Linux on common Intel servers and internal solid-state storage (SSD). The cost savings and performance increase has been phenomenal. In many cases, our customers have been able to pay for the migration their entire platform – hardware, software, services and everything else – for less than the cost of renewing a yearly hardware and software maintenance contract on their existing IBM POWER server.

Any IT administrator currently managing a legacy platform on proprietary hardware is performing a great disservice for their company if they’re not seriously considering Linux on x86.

Passing a Passphrase to GPG via Command Line

Security is all about trade-offs. PGP is great, but it’s designed to be an interactive process. If you need to script the PGP encryption of files, you can either remove the passphrase from the private key or pass the passphrase through the command line.

The official pgp command line utility offers this capability with the -z flag:

pgp -esa $SOURCEFILE $RECIPIENTPUBLICKEY -u $SENDERPRIVATEKEY -z $PASSPHRASE

While the gpg doesn’t have an explicit passphrase command, it does allow you to pass the passphrase through a file descriptor. Since stdin is file descriptor 0, the following command syntax will work:

echo $PASSPHRASE | gpg --passphrase-fd 0 --no-tty -esa -u $SENDERPRIVATEKEY -r $RECIPIENTPUBLICKEY $SOURCEFILE