[hobbit] temperature script compatible with Hobbit

Ralph Mitchell ralphmitchell at gmail.com
Thu Jul 26 06:20:09 CEST 2007


On 7/25/07, Charles Jones <jonescr at cisco.com> wrote:
> I'm looking for a temperature script suitable for linux machines (using
> lm_sensors). I found a couple on deadcat but none of them seemed to work
> very well.  I hacked on one and got basic temperature monitoring
> working, but no graphs because the output is not in whatever format
> Hobbits do_temp rrd module is expecting.
>
> Does anyone have an lm_sensors script that both alerts on temp
> thresholds and is compatible with Hobbits rrd graphing? I tried seaching
> TheShire with no luck.


Found this in old email (Dec 06):
Jerry Yu <jjj863 at gmail.com> 	
never mind, I found the answers in the source code,
rrd/do_temperature.c. [[ All hail goes to Open Source & Henrik! ]]
1. a lump-all status command will do. Format of the data portion is
somewhat restrictive '&green BMCambient 17 62\n&yellow BMCriserCard 32
93'. It'd be nice to have such format documented elsewhere other than
the source code.
2. if  'temperature' is used as 'test name', nothing needs to be done.
3. the check can be done locally on the client and the overall $status
is reported by 'status server1.temperature $status'.

So, if the script you hacked up can be persuaded to send a status
message that looks something like:

     $BB $BBDISP status "server,domain,com.temperature `date`
        &<color>  <variable_name> <temp_in_celsius>  <temp_in_fahrenheit>"

you could get graphs.  I'm away from my work machines right now, so
the above may be a little lacking.

Alternatively, try the NCV option.  Once a status message is set up to
be pushed through the ncv module, all you need in the status message
is:

     <variable name> : <value>

Anything on the line before the colon becomes the variable name,
anything after the colon is the value that gets stored.

Ralph Mitchell



More information about the Xymon mailing list