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 tool …

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 of …

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/regions …

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 to prepare, courtesy …

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 aren't …

more ...

Scripting YUM provides search using Python

Update 24-06-15

Thanks to this page, I fixed my script. It no longer requires root privillages. I also muted informational messages because they were not very informational.

The Story

Today I had a list of files (nagios check scripts), and I wanted to check for every file if there's a …

more ...

Batch fitting pictures in ImageMagick

I recently bought a digital frame for some of my more elderly relatives.
The frame's firmware was quite retarded, and I had 2 issues with it:

1. Pictures were always displayed in order

This might be a "not a bug but a feature" type of situation, but still.
I solved …

more ...

Resizing AWS root EBS in CentOS HVM

Update 04.07.15

This method doesn't work anymore because of some weird AWS restriction, which says you can't connect the root device of a marketplace AMI (like the CentOS one) to another VM, lest you discover its secrets.
I developed a better method which involves either rebooting or creating …

more ...

AWS's Block Device Mapping in CentOS

The Story

I'm using Amazon's EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, ephemerals etc. and the block devices inside the VM) in CentOS 6.5, I ran into an annoying issue. When inspecting my instance metadata using …

more ...

Accessing a specific server in an HTTP cluster

The Problem

Part1 - Fault tolerence

A common configuration of web servers is setting up multiple servers to serve the same content, with a load-balancing method redirecting / forwarding clients to a specific server.
For instance, let's say I'm using servers server and otherserver to serve the site cluster-name.
The cheapest (as …

more ...