mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
16 lines
264 B
Ruby
Executable file
16 lines
264 B
Ruby
Executable file
require 'rubygems' unless defined?(Gem)
|
|
|
|
class Graphite
|
|
def initialize(
|
|
s = 'graphite'
|
|
)
|
|
@server = s
|
|
end
|
|
|
|
def log path, value
|
|
socket = TCPSocket.new(@server, 2003)
|
|
socket.puts "#{path} #{value} #{Time.now.to_i}"
|
|
socket.close
|
|
end
|
|
end
|
|
|