class Bosh::Monitor::TsdbConnection
Public Class Methods
new(host, port)
click to toggle source
Calls superclass method
Bosh::Monitor::TcpConnection::new
# File lib/bosh/monitor/protocols/tsdb_connection.rb, line 3 def initialize(host, port) super("connection.tsdb", host, port) end
Public Instance Methods
send_metric(name, timestamp, value, tags = {})
click to toggle source
# File lib/bosh/monitor/protocols/tsdb_connection.rb, line 7 def send_metric(name, timestamp, value, tags = {}) formatted_tags = tags.map { |tag| tag.join("=") }.sort.join(" ") command = "put #{name} #{timestamp} #{value} #{formatted_tags}\n" @logger.debug("[TSDB] >> #{command.chomp}") send_data(command) end