Migrating Graphite's Dashboards

I just made a small script to migrate dashboards between two graphite servers.
Couldn't find a similar one anywhere, so I thought I'd upload it.
Note it's using http for its HTTP calls. It looks real nice.

old_server='http://old.server.com:1234'
new_server='http://better.server ...
more ...

Sending mail on coredumps

The Story

I recently found out that some of our backend code suffers from memory-related ceashes, namely SIGSEGV (a program tries to access memory it doesn't own). My initial response was to install and enable Abrt, which is a collection of utilities used in RHEL. Ubuntu has a similar ...

more ...

Using RPMBuild - My Shortlist

The Story

I was trying to tinker with Abrt, a daemon in charge of collecting and diagnosing various crashes in RHEL (more on that in a different post).
Because the crash hook is written in C (it was designed to be really quick), I couldn't use my usual method ...

more ...

Sending HBase metrics to Graphite using Python

The story

Although HBase is a crucial component in our current stack, the monitoring for it was quite incomplete. We only had general "is it running?" monitoring, with some very application-specific tests ("make sure scanning this table doesn't take too long").
By sending detailed metrics on our HBase tables ...

more ...

Preparing Certificate files for Nginx

The Story

When installing SSL certificates for nginx, assuming you're using certificate hierarchy (and not a self-signed ceritificate), you're required to concatenate all of the certificate files (*.crt) to a single file, starting from your site's certificate up to the root certificate.
Today I got this bundle ...

more ...

Installing Growroot on CentOS

The story

I currently work with CentOS on Amazon EC2. As I previously written, The HVM version of the AMI is created with a partitioned disk, instead of having the filesystem written directly on the block device.
Problem is, when creating a root device bigger than the default (8G), you ...

more ...

Chroot Snippet

The Story

Some time ago, my PC wouldn't boot.
This was my fault, as I needed to resize some partition, and resizing in Linux really means deleting the partition and creating a new one in the same place. I forgot to assign the partition the same UUID, which caused ...

more ...

Managing EC2 reservations with Scripts

The Story

Since we tend to hold our AWS EC2 VMs for a long time, we usually reserve them.
Reservations are like pre-buying instances - you pay AWS ahead of time for (let's say) a year, and get a discounted price.
The insterestng thing about EC2 reservations is that they ...

more ...

Appending Newline to File Ends with Ruby

I recently took over managing some config files from my dev colleagues. I was extremely annoyed to be reminded that Notepad (Windows' text editor) does 2 major Unix-incompatible things:

  1. CRLF line ending (\r\n and not \n)
  2. No newline at the end of file, which is something of a nicety ...
more ...