Archive | ruby

13 May 2013 ~ Comments Off

Building RPMs from ruby gems with fpm

Some time ago, I wrote up how I created RPMs for ruby gems to simplify installation on EL-flavoured distributions. In the comments for that article, Jordan Sissel pointed me at his fpm tool which I said I’d check out if I ever needed to build any more rubygem RPMs. Well, that time has come. I wanted… Continue reading

Continue Reading

06 January 2013 ~ Comments Off

Solving monitoring state storage problems using Redis

Redis is an in-memory key-value data store that provides a small number of primitives suitable to the task of building monitoring systems. As a lot of us are hacking in this space I thought I’d write a blog post summarizing where I’ve been using it in a little Sensu like monitoring system I have been Read More

Continue Reading

01 January 2013 ~ Comments Off

Scaling Nagios NRPE checks

Most Nagios systems does a lot of forking especially those built around something like NRPE where each check is a connection to be made to a remote system. On one hand I like NRPE in that it puts the check logic on the nodes using a standard plugin format and provides a fairly re-usable configuration Read More

Continue Reading

01 December 2012 ~ Comments Off

Preventing JRuby Concurrency Errors with Hamster

I was recently working on a small proof-of-concept application with a back-end server written in JRuby. In this proof-of-concept, multiple clients connect to the server to poll for status changes and to request actions be performed as the result of user interactions.

Read more on Preventing JRuby Concurrency Errors with Hamster »

Continue Reading

27 November 2012 ~ Comments Off

Portable Ruby Bit-Twiddling with #unpack()

Karlin Fox and I have been playing around with using the MQTT protocol to distribute information about the availability of certain high-demand resources in our office (namely, the bathroom). For some time now we have had an Arduino-powered red/green light (nicknamed “PottyMon”) radiating occupancy information about the upstairs bathroom across our open workspace.

Read more on Portable Ruby Bit-Twiddling with #unpack() »

The post Portable Ruby Bit-Twiddling with #unpack() appeared first on Atomic Spin.

Continue Reading

25 November 2012 ~ Comments Off

RubyConf 2012 Reflections: Bad Code Is a Symptom & Keeping Your Business Logic Functional

Denver Conference Center

I recently attended RubyConf 2012 in Denver, CO. I had a great time, and I learned a lot. While getting a clearer picture of the Ruby development community was interesting — particularly the tension among MRI, JRuby, Rubinius, etc. — the talks I keep thinking about were essentially language-independent.

Read more on RubyConf 2012 Reflections: Bad Code Is a Symptom & Keeping Your Business Logic Functional »

Continue Reading

16 November 2012 ~ Comments Off

A Lightweight “CMS” Using Ruby and Google Drive

My current project includes a fairly large amount of static text written by our customer’s marketing team. The authors generally do not have the background to provide valid HTML or contribute changes directly to our codebase.

Read more on A Lightweight “CMS” Using Ruby and Google Drive »

Continue Reading

13 November 2012 ~ Comments Off

Convenient Trick for Tolerance-based Test Assertions Using #ish

Sometimes it’s hard to just say what you mean.

When writing automated system and integration tests, I occasionally find it tricky to express the precise expected value of test output. For example, I expect the timestamp on a database record to be within a second or two of “now,” but I can’t predict the exact millisecond it will be created by the web server I’m posting to. And sometimes a floating point result is off by a millionth or trillionth, because the numeric representations used in my tests are not necessarily the binary equivalent of what the code under test is using.

Read more on Convenient Trick for Tolerance-based Test Assertions Using #ish »

Continue Reading

30 October 2012 ~ Comments Off

Collecting Metrics from Ruby Processes with Zabbix Trappers

A trapper and his brother, Noah, preparing a beaver trapJustin and I have recently started using Zabbix for monitoring, in place of Nagios. We’ve also taken the opportunity to start collecting even more metrics than before.

One nice thing about Zabbix is that it can use pre-existing Nagios monitoring plugins out of the box. But what if you also want to collect metrics from say, a Ruby process? You’re in luck! Zabbix can collect various forms of information (from numerical metrics to arbitrary strings, to log data) via the Zabbix sender protocol. Let’s set this up.

Read more on Collecting Metrics from Ruby Processes with Zabbix Trappers »

The post Collecting Metrics from Ruby Processes with Zabbix Trappers appeared first on Atomic Spin.

Continue Reading

31 August 2012 ~ Comments Off

Using MongoDB as Publish Subscribe middleware

Yesterday I mentioned on Twitter that I was playing with the MongoDB pub/sub features and that it worked quite well for my needs. What I didn’t mention was that the documentation and blog posts were a bit all over the show and the Ruby examples I saw didn’t actually do what they said they did Read More

Continue Reading