class Notification::Sensu
Public Class Methods
notify(event, message_text)
click to toggle source
To change this template use File | Settings | File Templates.
# File lib/gaddygaddy-client/notification/sensu.rb, line 23 def self.notify(event, message_text) report = { :name => "gaddy_notification", :output => event.to_json, :status => 2, :handler => 'send_event' } s = TCPSocket.open(SENSU_HOST, SENSU_PORT) s.print JSON.generate(report) s.close end