[hobbit] RRD data not being created: i give up.

Rob Munsch rmunsch at solutionsforprogress.com
Fri Oct 20 23:25:17 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Have a nice weekend, everyone.  Every test passes, but nothing actually
HAPPENS.

 <!-- 2006-10-20 16:25:00 EDT / 1161375900 --> <row><v> NaN </v></row>
                        <!-- 2006-10-20 16:30:00 EDT / 1161376200 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 16:35:00 EDT / 1161376500 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 16:40:00 EDT / 1161376800 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 16:45:00 EDT / 1161377100 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 16:50:00 EDT / 1161377400 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 16:55:00 EDT / 1161377700 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 17:00:00 EDT / 1161378000 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 17:05:00 EDT / 1161378300 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 17:10:00 EDT / 1161378600 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 17:15:00 EDT / 1161378900 -->
<row><v> NaN </v></row>
                        <!-- 2006-10-20 17:20:00 EDT / 1161379200 -->
<row><v> NaN </v></row>

Every indication is that, ultimately, a valid DS: gets exported to a
proper .rrd file and so on and so forth and blah blah blah.  It just
never draws the damn graph.  I'm going home.  Thank you all for your
patience and support.

Rob Munsch wrote:
> just to confirm: i found an old thread message from Henrik that says
> --extra-scripts
> 
> whereas the FAQ says
> --extra-script and --extra-tests
> 
> which makes sense, since you can have multiple extra-tesTS but only one
> extra scripT; but given my situation, i thought i'd better check...
> 
> Rob Munsch wrote:
>> Hubbard, Greg L wrote:
>>> I don't think your grep is working in cputemp.sh, so it writes out a
>>> blank since you are just echoing the value you get instead of testing it
>>> first.  You might add some debug, like:
>>> Echo "I found /${CPU}/ value for cputemp" >> $TMPLOG
>>> And see what ya get...
>> I found /102/ value for cputemp
> 
>> Okay.  There was a leading space, but i trimmed it off - that line now
>> reads
> 
>> CPU=`grep CPU $FNAME | awk '{ print $4 }' | sed '/^ / s///'`
> 
>> but i am still not getting any kind of graph. "hobbit graph cputemp"
>> remains a simple text link.  Thanks for your efforts.
> 
>> -----
>>  Fri Oct 20 16:46:43 EDT 2006
> 
>> Current CPU Temperature:  105 degrees Fahrenheit.
> 
>> 	Chillin' like a Villain.
> 
>> Status unchanged in 1 days,5 hours, 54 minutes
>> Status message received from 10.10.10.12
>> Client data available
>> hobbit graph cputemp		Zoom graph
>> -----
> 
>>> GLH
> 
>>> -----Original Message-----
>>> From: Rob Munsch [mailto:rmunsch at solutionsforprogress.com] 
>>> Sent: Friday, October 20, 2006 2:32 PM
>>> To: hobbit at hswn.dk
>>> Subject: Re: [hobbit] RRD data not being created.
>>> Hubbard, Greg L wrote:
>>>> I am not exactly sure what you are doing, Rob.
>>> That makes two of us!
>>>> It looks like your log file is getting what should be going to STDOUT 
>>>> when the script runs.  That won't help.
>>>> Can you post the content of cputemp.sh?
>>> The serverside or client?  heck, here's both.
>>> On the server in server/ext:
>>> -----
>>> hobbit at randomaccess ~/server/ext $ cat cputemp.sh #!/bin/sh # Input
>>> parameters: Hostname, testname (column), and messagefile #
>>> echo `date` >/tmp/cputemp.runs
>>> TMPLOG="/tmp/$1.$2.out"
>>> echo "$1, $2, $3" > $TMPLOG
>>> cat $3 >> $TMPLOG
>>> HOSTNAME="$1"
>>> TESTNAME="$2"
>>> FNAME="$3"
>>> # Check the test name so that this script can service multiple # data
>>> collection needs # if [ "$TESTNAME" = "cputemp" ] # then
>>>    # set up the Data Set, testname, and what kind:size:min:max
>>>    # U means Unknown max.
>>>    echo "DS:cputemp:GAUGE:600:0:U"
>>>    # name the RRD for the host and test
>>>    echo cputemp.rrd
>>>    # Analyze the message we got.  If it's only one line, grab it.
>>>    # The interesting number is the fourth element in this case.
>>>    CPU=`grep CPU $FNAME | awk '{ print $4 }'`
>>>    echo $CPU
>>> exit 0
>>> -----
> 
>>> On the client in client/ext:
>>> -----
>>> hobbit at currant:~/client/ext$ cat cputemp.sh #!/bin/sh
>>> COLUMN=cputemp
>>> COLOR=green
>>> MSG="Current CPU Temperature: "
>>> host=`hostname`
> 
>>> cpu_temp=$( ipmitool sensor | awk -F\| 'NR==2{print $2}' | sed '/\..*$/
>>> s///g' | sed '/^ */ s///g' )
>>> # Converting to Fahrenheit.
>>> temp=$((${cpu_temp}*9/5+32))
>>> # Ok, we have the temp in degrees as an integer.
>>> # Now to see if it's Very Bad.
>>> if ((${temp} > 130))
>>>         then
>>>         COLOR=red
>>>                 MSG="${MSG} ${temp} degrees Fahrenheit!
>>>                 Hothothot!
>>>                 "
>>> elif ((${temp} > 120))
>>>         then
>>>         COLOR=yellow
>>>                 MSG="${MSG} ${temp} degrees Fahrenheit.
>>>                 Getting Warmer...
>>>                 "
>>> else
>>>         MSG="${MSG} ${temp} degrees Fahrenheit.
>>>         Chillin' like a Villain.
>>>         "
>>> fi
>>> # Get this to the hobbit server
>>> $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
>>> ${MSG}
>>> "
>>> exit 0
>>> ----
>>>> Or are you doing this simply to get
>>>> it working...
>>> That was my Cunning Plan, yah.
>>> -rm
>>>> GLH
>>>> -----Original Message-----
>>>> From: Rob Munsch [mailto:rmunsch at solutionsforprogress.com]
>>>> Sent: Friday, October 20, 2006 1:22 PM
>>>> To: hobbit at hswn.dk
>>>> Subject: Re: [hobbit] RRD data not being created.
>>>> Hubbard, Greg L wrote:
>>>>> Is this when you are running the script by hand?  $2 is the second 
>>>>> parameter.  So to run the script by hand, you have to:
>>>>> $ ./script node test some.test.file.name
>>>>> And then you *should* see "test.rrd" written out.
>>>> Weird. running the test by hand gets me this hobbit at randomaccess 
>>>> ~/server/ext $ ./cputemp.sh currant.tbb cputemp 
>>>> currant.tbb.cputemp.out DS:cputemp:GAUGE:600:0:U cputemp.rrd 100
>>>> but cputemp.log in /var/log/hobbit shows only
>>>> DS:cputemp:GAUGE:600:0:U
>>>> cputemp.rrd
>>>> DS:cputemp:GAUGE:600:0:U
>>>> cputemp.rrd
>>>> DS:cputemp:GAUGE:600:0:U
>>>> cputemp.rrd
>>>> No temp!
>>>> rrdtool dump on cputemp.rrd shows me a buncha
>>>> <!-- 2006-10-20 00:00:00 EDT / 1161316800 --> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 02:00:00 EDT / 1161324000 --> 
>>>> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 04:00:00 EDT / 1161331200 --> 
>>>> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 06:00:00 EDT / 1161338400 --> 
>>>> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 08:00:00 EDT / 1161345600 --> 
>>>> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 10:00:00 EDT / 1161352800 --> 
>>>> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 12:00:00 EDT / 1161360000 --> 
>>>> <row><v> NaN </v></row>
>>>>                         <!-- 2006-10-20 14:00:00 EDT / 1161367200 --> 
>>>> <row><v> NaN </v></row>
>>>>> The way I tested this was to capture the output of a client side 
>>>>> script (just cut from the browser and paste in a text file), then run
>>>>> it by hand using the above method.  The RRD commands are written to 
>>>>> the terminal, and any griping is in the log.
>>>>> Glad you are making progress.
>>>>> GLH
>>>>> -----Original Message-----
>>>>> From: Rob Munsch [mailto:rmunsch at solutionsforprogress.com]
>>>>> Sent: Thursday, October 19, 2006 2:48 PM
>>>>> To: hobbit at hswn.dk
>>>>> Subject: Re: [hobbit] RRD data not being created.
>>>>> Hubbard, Greg L wrote:
>>>>>> Rob, if you implemented the script example I posted, you should be 
>>>>>> able to look in the script log to see if it is doing anything.  Just
>>>>>> remember not to refer to NCV anywhere in the configuration.
>>>>>> The log will tell you if the script is being called at all -- you 
>>>>>> can
>>>>>> enable any debug you want -- just make sure you write it to the log,
>>>>>> since you will never see STDOUT.  You can even cat the incoming file
>>>>>> out to the log.
>>>>>> This is what I had to do to get it working -- sort of organically.
>>>>> I have .rrd files! huzzah.  Now i just need to get the actual graph 
>>>>> to
>>>>> appear, instead of a text link.
>>>>> Also, something Odd is happening such that variables are not being 
>>>>> expanded.  Frex,
>>>>> TESTNAME="$2"
>>>>>    echo $TESTNAME.rrd
>>>>> is coming out as just
>>>>> .rrd
>>>>> o_O
>>>>> still, it's progress :D
>>>>>> GLH
>>>>>> -----Original Message-----
>>>>>> From: Rob Munsch [mailto:rmunsch at solutionsforprogress.com]
>>>>>> Sent: Thursday, October 19, 2006 1:47 PM
>>>>>> To: hobbit at hswn.dk
>>>>>> Subject: [hobbit] RRD data not being created.
>>>>>> I'm pretty sure this is the trouble.  Ladies and gentlemen, i am 
>>>>>> stumped.  Following all the instructions in the docs, manpages, faqs
>>>>>> and alien communications, as well as the very helpful samples 
>>>>>> provided by list members... no new file ever gets created in
>>>>> ~/data/rrd/<hostname>.
>>>>>> I have status, so i know client info is reaching server.
>>>>>> I have copied almost verbatim the sample server-side script needed 
>>>>>> to
>>>>>> parse this info and spit it back out to RRD.
>>>>>> And i have eschewed NCV and gone in favor of hobbitd_channel 
>>>>>> --options to make this all work right, or so I thought.
>>>>>> If you make a custom script and the rrd file never happens, where 
>>>>>> would you look first?  The serverside script itself?  hobbitlaunch.
>>>>>> or
>>>>>> -graph.cfg options?  Somewhere else?  Mars?  I'd be willing to check
>>>>>> Mars at this point.
>>>>> To unsubscribe from the hobbit list, send an e-mail to 
>>>>> hobbit-unsubscribe at hswn.dk
>>>>> To unsubscribe from the hobbit list, send an e-mail to 
>>>>> hobbit-unsubscribe at hswn.dk
> 
> 
>>>> To unsubscribe from the hobbit list, send an e-mail to 
>>>> hobbit-unsubscribe at hswn.dk
> 
>>>> To unsubscribe from the hobbit list, send an e-mail to 
>>>> hobbit-unsubscribe at hswn.dk
> 
> 
> 
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe at hswn.dk
> 
> 
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe at hswn.dk
> 
> 
> 
> 
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
> 
> 
> 
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
> 
> 
> 
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
> 
> 
> 

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk




- --
Rob Munsch
Solutions For Progress IT
www.solutionsforprogress.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFOT69BvBcJFK6xYURArhnAKCJ+ywB4upqaGVhdho2p/91trVdvQCdGgMg
0c8kHM+9Jc+c1lBlHb3r2mY=
=22Ux
-----END PGP SIGNATURE-----



More information about the Xymon mailing list