Sha256: 748bbcaf7953b0cb0d56d71ef53e6da6488b244be94dc6d3db83143ad4c9a523
Contents?: true
Size: 538 Bytes
Versions: 42
Compression:
Stored size: 538 Bytes
Contents
class Riemann::Babbler::Cputemp < Riemann::Babbler def init plugin.set_default(:service, 'cputemp') plugin.set_default(:interval, 60) plugin.set_default(:cmd, '/usr/bin/sensors | grep "CPU Temperature:" | awk "{print $3}" | cut -c2-3') plugin.states.set_default(:warning, 60) plugin.states.set_default(:critical, 80) end def run_plugin File.exists? '/usr/bin/sensors' end def collect { :service => plugin.service, :metric => shell(plugin.cmd).to_i, :description => "CPU Temperature" } end end
Version data entries
42 entries across 42 versions & 1 rubygems