Class: Notification::Sensu
- Inherits:
-
Object
- Object
- Notification::Sensu
- Defined in:
- lib/gaddygaddy-client/notification/sensu.rb
Class Method Summary collapse
-
.notify(event, message_text) ⇒ Object
To change this template use File | Settings | File Templates.
Class Method Details
.notify(event, message_text) ⇒ Object
To change this template use File | Settings | File Templates.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/gaddygaddy-client/notification/sensu.rb', line 23 def self.notify(event, ) 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 |