This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
require 'socket' | |
statsd_host = "" | |
statsd_port = "8125" | |
namespace_prefix = "statsd-ruby" | |
mode = "statsd" | |
ARGV.each do |arg| | |
name, value = arg.split '=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'socket' | |
require 'optparse' | |
# Collect INFO from Redis, report it to Graphite | |
opts = OptionParser.new do |opts| | |
opts.banner = "Usage: redis-graphite.rb redis-host[:redis-port] graphite-host" | |
opts.on( '-h', '--help', 'Display this screen' ) do | |
puts opts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
class Graphite | |
def initialize(host) | |
@host = host | |
end | |
def socket | |
return @socket if @socket && [email protected]? | |
@socket = TCPSocket.new(@host, 2003) |
NewerOlder