Jabber with Ruby 1
I got curious on how easy it might be to integrate Jabber with some Ruby projects. Turns out, it’s dead simple. (Why would I ever think otherwise?) That’s due to the efforts of the folks over at the xmpp4r project. One can do it with a simple little script of a dozen lines or so, once that package is installed. Something like this:
require 'xmpp4r/client'
include Jabber
client = Client::new(JID::new('username'))
client.connect
client.auth('password')
client.send Message::new(colinbartlett@gmail.com,"test!!").set_type(:normal).set_id('1')
client.closeOn our project list coming up is integrating Jabber with our Nagios server so that notifications can be sent to us via IM when we’re online instead of SMS. (To avoid the $70 SMS bills in months when one of the servers has a bad day!).
