Sha256: 6191ae83a56adbf196d32b6628b7a5c40df39b87feab71017f090e53980388b1
Contents?: true
Size: 647 Bytes
Versions: 37
Compression:
Stored size: 647 Bytes
Contents
require 'knife-spork/plugins/plugin' module KnifeSpork module Plugins class Graphite < Plugin name :graphite hooks :after_promote_remote def perform environments.each do |environment| begin message = "deploys.chef.#{environment} 1 #{Time.now.to_i}\n" socket = TCPSocket.open(config.server, config.port) socket.write(message) rescue Exception => e ui.error 'Graphite was unable to process the request.' ui.error e.to_s ensure socket.close unless socket.nil? end end end end end end
Version data entries
37 entries across 37 versions & 2 rubygems