Apply fixes uniformly.

Working on a monitoring system, I was getting a version of check_graphite.rb configured (it’s an upgraded version of the one that’s stock, in that it adds some new features).

Everything was going well.. then I noticed the graphing component wasn’t picking up and .. well, graphing.  The metric name that was being output was ‘true’, vs the value I had set (in this case ‘battles’).

I looked over the code.  Oh, did I ever.  Several hours of looking, testing, adding debug statements… nothing.  I walked away frustrated.

A few hours later I came back to it and went .. huh?  Here’s the code

o.on('-s', '--shortname', 'Metric short identifier (required for performance data)') { |oc| options[:shortname] = oc }

Looks pretty sane… except I realized it was actually supposed to be:

o.on('-s', '--shortname NAME', 'Metric short identifier (required for performance data)') { |oc| options[:shortname] = oc }

If you don’t add NAME (or some keyword).. it ignores any values applied to the flag, and returns true if set.  Ok then, feeling like an idiot (since i wrote this code)… I’d better fix my own copy of this, since i’d written mine first, then made a copy for work.

I open my copy… it’s already fixed. Has been for a long time.  Not only that, a second typo is also fixed.

The moral of this, apply changes uniformly.

Server space cleanup, part 1

I removed the wooden box I’d built around my server rack.  It’s been there .. almost 4 years now, keeping most of the dust and dirt out of my servers (well, more or less).

It was quite well constructed, and was not all that easy to take apart.  I’d run all the important wires through a hole in the back… of course in such a way they all needed to be unplugged to remove the back!

Managed to do it however with a little help and effort.  The rack is now out there uncovered for the first time in years, and it’s smaller than I remember it. No doubt, that box was a bit bigger on all sides (it was made from 2x4s after all).

I worried for a little while that the rack I just bought was going to be as big, but I just looked at it. The old rack is definitely 40U, the new one is 32U.. that means it’ll be 14 inches shorter, at 56 inches. (Oh, and wheels of course).

Purchases incoming!

Finally decided to replace my existing server rack.  I’d bought cheap when I picked it up about 4 years ago, and while it’s been solid, it’s an open frame rack, which required me to enclose it.  That’s not ideal, for a lot of reasons.

So I bought a shorter, fully enclosed rack.  Turns out this one includes a fan/temperature controller.  My DIY one didn’t, so this will be a welcome addition.

I also picked up a proper in-rack LCD, and some more shelves.  No more trying to fake it!  It all comes more or less within the next 2 weeks, so once it arrives I’ll certainly be busy.  Moving everything out of the existing rack is no joke after all, and there’s no small number of wires that will need to be nicely run.

Totally worth it though. I may even take pictures when I’m done.