class Falcore::Dumper::DogStatsd
Private Instance Methods
stat(node)
click to toggle source
@private
Push stats to statsd for this particular node
.
@param [Node::Base] node
the node to examine
# File lib/falcore/dumpers/dogstatsd.rb, line 47 def stat(node) options = { tags: ["name:#{node.display_name}"] } # Up/down statsd.gauge('jenkins.node.offline', node.offline? ? 1 : 0, options) # Idle statsd.gauge('jenkins.node.idle', node.idle? ? 1 : 0, options) # Response time statsd.timing('jenkins.node.response_time', node.response_time, options) # Temporary space statsd.gauge('jenkins.node.temporary_space', node.temporary_space, options) # Disk space statsd.gauge('jenkins.node.disk_space', node.disk_space, options) # Free memory statsd.gauge('jenkins.node.free_memory', node.free_memory, options) # Total memory statsd.gauge('jenkins.node.total_memory', node.total_memory, options) # Free swap statsd.gauge('jenkins.node.free_swap', node.free_swap, options) # Total swap statsd.gauge('jenkins.node.total_swap', node.total_swap, options) end
statsd()
click to toggle source
# File lib/falcore/dumpers/dogstatsd.rb, line 35 def statsd @statsd ||= Statsd.new(config.dogstatsd.host, config.dogstatsd.port) end