#!/usr/bin/env ruby require 'rubygems' require 'net/toc' user = 'your_bot_name' password = 'bot_password' msg = ARGV[0].to_s.gsub('\n', "\n") client = Net::TOC.new(user, password) client.connect sleep 3 buddies = [] client.buddy_list.each_group { |g, b| buddies = b if g == 'Friends' } buddies.each do |b| b.send_im(msg) if b.available? end sleep 3 client.disconnect
define command{
command_name notify-service-by-aim
command_line $USER1$/aim_notifier.rb $ARG1$ $ARG2$ "***** Nagios *****\n\nNotification Ty
pe: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$"
}service_notification_commands notify-service-by-email,notify-service-by-aim
Repeat the configuration if you want to use the AIM notification for hosts as well.






