|
|
@ -24,6 +24,10 @@ admin = @conf['admin']
|
|
|
|
@probes = @conf['probes']
|
|
|
|
@probes = @conf['probes']
|
|
|
|
@tunit = @conf['units']
|
|
|
|
@tunit = @conf['units']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Non-configurable
|
|
|
|
|
|
|
|
@simplehot = 75
|
|
|
|
|
|
|
|
@simplecold = 50
|
|
|
|
|
|
|
|
|
|
|
|
### Begin sanity check ###
|
|
|
|
### Begin sanity check ###
|
|
|
|
STDOUT.sync = true
|
|
|
|
STDOUT.sync = true
|
|
|
|
errcount = 0
|
|
|
|
errcount = 0
|
|
|
@ -172,9 +176,9 @@ def process_tdata(host, simple=false)
|
|
|
|
if tdata.is_integer?
|
|
|
|
if tdata.is_integer?
|
|
|
|
print tdata + "°#{@tunit}"
|
|
|
|
print tdata + "°#{@tunit}"
|
|
|
|
if simple #This is mostly just an Easter egg
|
|
|
|
if simple #This is mostly just an Easter egg
|
|
|
|
if tdata.to_i > 75
|
|
|
|
if tdata.to_i > @simplehot
|
|
|
|
sdata = "Hot"
|
|
|
|
sdata = "Hot"
|
|
|
|
elsif tdata.to_i < 50
|
|
|
|
elsif tdata.to_i < @simplecold
|
|
|
|
sdata = "Cold"
|
|
|
|
sdata = "Cold"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sdata = "Fair"
|
|
|
|
sdata = "Fair"
|
|
|
|