Xymon Mailing List Archive search

Custom RRD graphs

30 messages in this thread

list David Stuffle · Tue, 1 Mar 2005 08:06:34 -0500 ·
Hello,
I'm trying to learn how to create custom graphs.  I have it working for
graphing license usage but I'm am not clear on a few things.  Here is what I
put in the hobbitgraph.cfg:
 
[license]
        TITLE License Utilization
        YAXIS Used Licenses
        DEF:avg=license.rrd:license:AVERAGE
        LINE2:avg#@COLOR@:Used Licenses
        GPRINT:avg:LAST: \: %5.1lf (cur)
        GPRINT:avg:MAX: \: %5.1lf (max)
        GPRINT:avg:MIN: \: %5.1lf (min)
        GPRINT:avg:AVERAGE: \: %5.1lf (avg)\n
 
 
My question is, what does AVERAGE mean in the DEF line?  What other options
are there besides AVERAGE?
 
Also, the license count will always be a whole number from say, 0 to 30.
Sometimes my graph shows, for example, 3.6 licenses used.   Is there an
option I need to add to tell it to always use a whole number?  My custom_rrd
script doesn't send anything except a whole number. 
 
Thanks for any help.
 
David Stuffle
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
Please note that any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of the company.
Finally, the recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage caused
by any virus transmitted by this email.
list Asif Iqbal · Tue, 1 Mar 2005 10:35:31 -0500 ·
quoted from David Stuffle
On Tue, Mar 01, 2005 at 08:06:34AM, Stuffle, David wrote:
Hello,
I'm trying to learn how to create custom graphs.  I have it working for
graphing license usage but I'm am not clear on a few things.  Here is what I
put in the hobbitgraph.cfg:
 
[license]
        TITLE License Utilization
        YAXIS Used Licenses
        DEF:avg=license.rrd:license:AVERAGE
        LINE2:avg#@COLOR@:Used Licenses
        GPRINT:avg:LAST: \: %5.1lf (cur)
        GPRINT:avg:MAX: \: %5.1lf (max)
        GPRINT:avg:MIN: \: %5.1lf (min)
        GPRINT:avg:AVERAGE: \: %5.1lf (avg)\n
 
 
My question is, what does AVERAGE mean in the DEF line?  What other options
man rrdgraph

OR

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/manual/rrdgraph.html
quoted from David Stuffle
are there besides AVERAGE?
 
Also, the license count will always be a whole number from say, 0 to 30.
Sometimes my graph shows, for example, 3.6 licenses used.   Is there an
You should be able to use CDEF get whole numbers.

Here is tutorial on that

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/cdeftutorial.html

I would think RRD questions should be directed to RRD mailing list 

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/mailinglists.html

Thanks
quoted from David Stuffle
option I need to add to tell it to always use a whole number?  My custom_rrd
script doesn't send anything except a whole number. 
 
Thanks for any help.
 
David Stuffle
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
Please note that any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of the company.
Finally, the recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage caused
by any virus transmitted by this email.
-- 

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
 the one most responsive to change."    - Charles Darwin
list David Stuffle · Tue, 1 Mar 2005 12:10:07 -0500 ·
The hobbitgraph.cgi man page has a reference to the rrdgraph man page but I
don't have the rrdgraph man page on my system.  Does anyone else?

I'll check out the CDEF.

Sorry, I didn't think about the RRD mailing list.

David Stuffle 
quoted from Asif Iqbal
 
-----Original Message-----
From: Asif Iqbal [mailto:user-c8222abeff59@xymon.invalid] Sent: Tuesday, March 01, 2005 10:36 AM
To: 'user-ae9b8668bcde@xymon.invalid'
Subject: Re: [hobbit] Custom RRD graphs


On Tue, Mar 01, 2005 at 08:06:34AM, Stuffle, David wrote:
Hello,
I'm trying to learn how to create custom graphs.  I have it working for graphing license usage but I'm am not clear on a few things.  Here is what I put in the hobbitgraph.cfg:
 [license]
        TITLE License Utilization
        YAXIS Used Licenses
        DEF:avg=license.rrd:license:AVERAGE
        LINE2:avg#@COLOR@:Used Licenses
        GPRINT:avg:LAST: \: %5.1lf (cur)
        GPRINT:avg:MAX: \: %5.1lf (max)
        GPRINT:avg:MIN: \: %5.1lf (min)
        GPRINT:avg:AVERAGE: \: %5.1lf (avg)\n
  My question is, what does AVERAGE mean in the DEF line?  What other options
man rrdgraph

OR

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/manual/rrdgraph.html
are there besides AVERAGE?
 Also, the license count will always be a whole number from say, 0 to 30.
Sometimes my graph shows, for example, 3.6 licenses used.   Is there an
You should be able to use CDEF get whole numbers.

Here is tutorial on that

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/cdeftutorial.htm
l
quoted from Asif Iqbal

I would think RRD questions should be directed to RRD mailing list 
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/mailinglists.html

Thanks
option I need to add to tell it to always use a whole number?  My custom_rrd script doesn't send anything except a whole number.
 Thanks for any help.
 David Stuffle
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most
intelligent, but
 the one most responsive to change."    - Charles Darwin


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
Please note that any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of the company.
Finally, the recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage caused
by any virus transmitted by this email.
list Asif Iqbal · Tue, 1 Mar 2005 13:38:29 -0500 ·
quoted from David Stuffle
On Tue, Mar 01, 2005 at 12:10:07PM, Stuffle, David wrote:
The hobbitgraph.cgi man page has a reference to the rrdgraph man page but I
don't have the rrdgraph man page on my system.  Does anyone else?
The man pages should be under the directory where you had rrdtool
installed.

You can add that directory to your MANPATH and then run man for rrd
stuff
quoted from David Stuffle
-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
 the one most responsive to change."    - Charles Darwin
list Dan Vande More · Thu, 10 Nov 2005 16:18:03 -0600 ·
Hello All,

I've read every post on the list, but still cannot figure out why I
can't get rrds to appear.

I've written a custom script that does something like:

/home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

On 1.2.3.4 (server), my hobbitserver.cfg has this:

TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,Memoryutil=ncv"

The reason the test is memoryutil is because it's memory utilization
gotta via snmp for an ironport device.

My interpretation of the hobbitd_rrd.8 page, and this post:
http://www.hswn.dk/hobbiton/2005/06/msg00261.html
gives me reason to believe that I don't have to do anything but have a
script pass bb a "$test (=|:) value" value, and tell TEST2RRD
"$test=ncv", and I'd be graphing in no time. However, my
~hobbit/rrd/$hostname/ still doesn't have a $test.rrd.

Am I missing something? Doing something wrong? Assuming some things I
shouldn't be? Anyone have the ncv stuff working?

Thanks

Dan
list Dan Vande More · Fri, 11 Nov 2005 10:36:23 -0600 ·
Sorry for the hasty followup, but does anyone have any advice?

Thanks
quoted from Dan Vande More


On 11/10/05, Dan Vande More <user-f3c4c62d9d50@xymon.invalid> wrote:
Hello All,

I've read every post on the list, but still cannot figure out why I
can't get rrds to appear.

I've written a custom script that does something like:

/home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

On 1.2.3.4 (server), my hobbitserver.cfg has this:

TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,Memoryutil=ncv"

The reason the test is memoryutil is because it's memory utilization
gotta via snmp for an ironport device.

My interpretation of the hobbitd_rrd.8 page, and this post:
http://www.hswn.dk/hobbiton/2005/06/msg00261.html
gives me reason to believe that I don't have to do anything but have a
script pass bb a "$test (=|:) value" value, and tell TEST2RRD
"$test=ncv", and I'd be graphing in no time. However, my
~hobbit/rrd/$hostname/ still doesn't have a $test.rrd.

Am I missing something? Doing something wrong? Assuming some things I
shouldn't be? Anyone have the ncv stuff working?

Thanks

Dan
list Dan Vande More · Fri, 11 Nov 2005 21:57:31 -0600 ·
Ok, I found the issue.

Though I've written dozens of bb clients, I've never come across
exactly how BB expects the information. This might be hobbit specific
however. In my original email, I stated I was sending the data from my
script like:

home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

This is not the correct way to do this hobbit-wise. You need to put a
\n in between the color status and the data you're pushing via ncv.
That is:

home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil
green\nMemoryutil : 11"

Perhaps it's just my interpretation, but I think we should reword the
documentation to explicitly say we do not need to do any
--extra-script or --extra-tests if one is using ncv.

Finally, I perused a lot of the man pages and code for the past few
hours, and only found one error - and that was a spelling error. In
~hobbit/server/etc/hobbitgraph.cfg, temperature is misspelled:
# comment out the [tempeature] section above, and

I'm now using ncv for collecting 8 datapoints and it appears to
collect and graph data flawlessly. Thanks for the solid implementation
Henrik.

-Dan
quoted from Dan Vande More

On 11/11/05, Dan Vande More <user-f3c4c62d9d50@xymon.invalid> wrote:
Sorry for the hasty followup, but does anyone have any advice?

Thanks


On 11/10/05, Dan Vande More <user-f3c4c62d9d50@xymon.invalid> wrote:
Hello All,

I've read every post on the list, but still cannot figure out why I
can't get rrds to appear.

I've written a custom script that does something like:

/home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

On 1.2.3.4 (server), my hobbitserver.cfg has this:

TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,Memoryutil=ncv"

The reason the test is memoryutil is because it's memory utilization
gotta via snmp for an ironport device.

My interpretation of the hobbitd_rrd.8 page, and this post:
http://www.hswn.dk/hobbiton/2005/06/msg00261.html
gives me reason to believe that I don't have to do anything but have a
script pass bb a "$test (=|:) value" value, and tell TEST2RRD
"$test=ncv", and I'd be graphing in no time. However, my
~hobbit/rrd/$hostname/ still doesn't have a $test.rrd.

Am I missing something? Doing something wrong? Assuming some things I
shouldn't be? Anyone have the ncv stuff working?

Thanks

Dan
list Henrik Størner · Sat, 12 Nov 2005 08:25:26 +0100 ·
quoted from Dan Vande More
On Fri, Nov 11, 2005 at 09:57:31PM -0600, Dan Vande More wrote:
Ok, I found the issue.

Though I've written dozens of bb clients, I've never come across
exactly how BB expects the information. This might be hobbit specific
It is a result of how the NCV handler in hobbitd_rrd expects data to
be formatted, so yes - this is hobbit specific.
quoted from Dan Vande More
however. In my original email, I stated I was sending the data from my
script like:

home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

This is not the correct way to do this hobbit-wise. You need to put a
\n in between the color status and the data you're pushing via ncv.
I've updated the hobbitd_rrd man page and added this to the section on
how to use the NCV data:

  Note that each "NAME : value" must be on a line by itself. If you have
  a custom script generating the status- or data-message that is fed
  into the NCV handler, make sure it inserts a newline before each
  of the data-items you want to track.

That should hopefully make it clearer - I'm sorry it bit you.
quoted from Dan Vande More
Perhaps it's just my interpretation, but I think we should reword the
documentation to explicitly say we do not need to do any
--extra-script or --extra-tests if one is using ncv.
Agreed - did that as well.
quoted from Dan Vande More
Finally, I perused a lot of the man pages and code for the past few
hours, and only found one error - and that was a spelling error. In
~hobbit/server/etc/hobbitgraph.cfg, temperature is misspelled:
# comment out the [tempeature] section above, and
Fixed :-)
quoted from Dan Vande More
I'm now using ncv for collecting 8 datapoints and it appears to
collect and graph data flawlessly. Thanks for the solid implementation
Henrik.
Thank you for reporting what you found - that is the kind of feedback
I need to make Hobbit better.


Regards,
Henrik
list Rich Smrcina · Sat, 12 Nov 2005 11:22:41 -0600 ·
To expand on this some and provide ultimate flexibility how about an optional NCV configuration file?  When used, this file could be ordered by TEST, with HOSTs being qualified, and appropriate pattern matching of course (sort of the opposite of hobbit-alerts.cfg).  Each entry under the test would contain the text to look for (it could be different for a   test/host pair) and the graphing parameters for that specific combination.  I would envision:

TEST=pg_util
  Page_Utilization,GAUGE,0:100
TEST=sp_util
  Spool_Utilization,GAUGE,0:100 HOST=vm1
  Queue_File,GAUGE,0:100 Data_File,GAUGE,0:100 HOST=^vse.* GRAPH=pqueue

Where the pg_util graph will look for the text 'Page_Utilization' and graph the white space delimited value after it (after = or :).  And sp_util will look for Spool_Utilization for vm1 and graph that data. The graphing parameters will come from hobbitgraph.cfg (as usual), with the default being the test name.  For hosts beginning with 'vse' it will look for two values, Queue_File and Data_File and use the pqueue graphing parameters.  Strange, but true, I have a column that has a different number of data points with different names depending upon the host (they are both considered spool utilization).

I certainly don't know all of the variations, but this may eliminate the need for most extra tests.
quoted from Henrik Størner

Henrik Stoerner wrote:
On Fri, Nov 11, 2005 at 09:57:31PM -0600, Dan Vande More wrote:
Ok, I found the issue.

Though I've written dozens of bb clients, I've never come across
exactly how BB expects the information. This might be hobbit specific

It is a result of how the NCV handler in hobbitd_rrd expects data to
be formatted, so yes - this is hobbit specific.

however. In my original email, I stated I was sending the data from my
script like:

home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

This is not the correct way to do this hobbit-wise. You need to put a
\n in between the color status and the data you're pushing via ncv.

I've updated the hobbitd_rrd man page and added this to the section on
how to use the NCV data:

  Note that each "NAME : value" must be on a line by itself. If you have
  a custom script generating the status- or data-message that is fed
  into the NCV handler, make sure it inserts a newline before each
  of the data-items you want to track.

That should hopefully make it clearer - I'm sorry it bit you.

Perhaps it's just my interpretation, but I think we should reword the
documentation to explicitly say we do not need to do any
--extra-script or --extra-tests if one is using ncv.

Agreed - did that as well.

Finally, I perused a lot of the man pages and code for the past few
hours, and only found one error - and that was a spelling error. In
~hobbit/server/etc/hobbitgraph.cfg, temperature is misspelled:
# comment out the [tempeature] section above, and

Fixed :-)

I'm now using ncv for collecting 8 datapoints and it appears to
collect and graph data flawlessly. Thanks for the solid implementation
Henrik.

Thank you for reporting what you found - that is the kind of feedback
I need to make Hobbit better.


Regards,
Henrik

-- 

Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Rich Smrcina · Sat, 12 Nov 2005 11:22:57 -0600 ·
Brilliant detective work Dan.  I am trying something similar, but 
haven't had the good luck that you enjoy.

Here is the status message being produced for a column called pg_util 
(Page Utilization):

status vm1.pg_util green 12 Nov 2005 10:55:57  Page Utilization  OK
pg_util : 1


z/VM Version 4 Release 4.0, service level 0402 (32-bit)
             EXTENT EXTENT  TOTAL  PAGES   HIGH    %
VOLID  RDEV  START    END  PAGES IN USE   PAGE USED
------ ---- ------ ------ ------ ------ ------ ----
440RES 0124    257    390  24120    529    559   2%
PAGSP1 0102    301   3338 546840      0      0   0%
                           ------ ------        ----
SUMMARY                   570960    529          1%
USABLE                    570960    529          1%

TEST2RRD contains 'pg_util=ncv' (it's not at the end, does it need to 
be?) and

NCV_pg_util="pg_util:GAUGE"

I've disabled the code in the extra script for this test and removed it 
from the --extra-tests list.  I've verified with ps that hobbitd_channel 
and hobbitd_larrd aren't using them anymore.  I still have a custom 
graph defined for this test, is that allowed using NCV or doesn't it care?
quoted from Dan Vande More

Dan Vande More wrote:
Ok, I found the issue.

Though I've written dozens of bb clients, I've never come across
exactly how BB expects the information. This might be hobbit specific
however. In my original email, I stated I was sending the data from my
script like:

home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

This is not the correct way to do this hobbit-wise. You need to put a
\n in between the color status and the data you're pushing via ncv.
That is:

home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil
green\nMemoryutil : 11"

Perhaps it's just my interpretation, but I think we should reword the
documentation to explicitly say we do not need to do any
--extra-script or --extra-tests if one is using ncv.

Finally, I perused a lot of the man pages and code for the past few
hours, and only found one error - and that was a spelling error. In
~hobbit/server/etc/hobbitgraph.cfg, temperature is misspelled:
# comment out the [tempeature] section above, and

I'm now using ncv for collecting 8 datapoints and it appears to
collect and graph data flawlessly. Thanks for the solid implementation
Henrik.

-Dan

On 11/11/05, Dan Vande More <user-f3c4c62d9d50@xymon.invalid> wrote:
Sorry for the hasty followup, but does anyone have any advice?

Thanks


On 11/10/05, Dan Vande More <user-f3c4c62d9d50@xymon.invalid> wrote:
Hello All,

I've read every post on the list, but still cannot figure out why I
can't get rrds to appear.

I've written a custom script that does something like:

/home/monitor/bb/bin/bb 1.2.3.4 "status iron1-mgmt.Memoryutil green
Memoryutil : 11"

On 1.2.3.4 (server), my hobbitserver.cfg has this:

TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,Memoryutil=ncv"

The reason the test is memoryutil is because it's memory utilization
gotta via snmp for an ironport device.

My interpretation of the hobbitd_rrd.8 page, and this post:
http://www.hswn.dk/hobbiton/2005/06/msg00261.html
gives me reason to believe that I don't have to do anything but have a
script pass bb a "$test (=|:) value" value, and tell TEST2RRD
"$test=ncv", and I'd be graphing in no time. However, my
~hobbit/rrd/$hostname/ still doesn't have a $test.rrd.

Am I missing something? Doing something wrong? Assuming some things I
shouldn't be? Anyone have the ncv stuff working?

Thanks

Dan
-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Dan Vande More · Sat, 12 Nov 2005 13:06:51 -0600 ·
quoted from Rich Smrcina
On 11/12/05, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
Brilliant detective work Dan.  I am trying something similar, but
haven't had the good luck that you enjoy.
I am a very bad C coder. I'd call it luck too.:)
quoted from Rich Smrcina
Here is the status message being produced for a column called pg_util
(Page Utilization):

status vm1.pg_util green 12 Nov 2005 10:55:57  Page Utilization  OK
pg_util : 1


z/VM Version 4 Release 4.0, service level 0402 (32-bit)
             EXTENT EXTENT  TOTAL  PAGES   HIGH    %
VOLID  RDEV  START    END  PAGES IN USE   PAGE USED
------ ---- ------ ------ ------ ------ ------ ----
440RES 0124    257    390  24120    529    559   2%
PAGSP1 0102    301   3338 546840      0      0   0%
                           ------ ------        ----
SUMMARY                   570960    529          1%
USABLE                    570960    529          1%
Looks good;)
quoted from Rich Smrcina
TEST2RRD contains 'pg_util=ncv' (it's not at the end, does it need to
be?) and
Nope, shouldn't matter where it is.
quoted from Rich Smrcina
NCV_pg_util="pg_util:GAUGE"

I've disabled the code in the extra script for this test and removed it
from the --extra-tests list.  I've verified with ps that hobbitd_channel
and hobbitd_larrd aren't using them anymore.  I still have a custom
graph defined for this test, is that allowed using NCV or doesn't it care?
Custom graphing (with ncv) is really a two step process. The first and
most important is collecting the data into an rrd, which is simple and
done by adding your COLUMNNAME=ncv to TEST2RRD and correctly passing
data back to hobbit:)
I used "rrdtool dump foo.rrd > tmp.xml" to verify that it was actually
collecting some data.

I would venture to guess that as long as your test/column names stay
the same, there will be no problems in switching from --extra-tests to
ncv.

The second step, of course, is actually graphing it using data from
the rrd. I found this to be the most difficult step, if only because I
skim documentation - I don't read unless I'm desperate. Again, I'm
going out on a limb to say as long as your datasources/testnames/Y
values are all the same, your graph configuration should work post-ncv
conversion.

Good luck

Dan
list Rich Smrcina · Sat, 12 Nov 2005 21:17:20 -0600 ·
quoted from Dan Vande More
Dan Vande More wrote:
Custom graphing (with ncv) is really a two step process. The first and
most important is collecting the data into an rrd, which is simple and
done by adding your COLUMNNAME=ncv to TEST2RRD and correctly passing
data back to hobbit:)
I used "rrdtool dump foo.rrd > tmp.xml" to verify that it was actually
collecting some data.
My rrd file isn't even being updated.  That leads me to believe that 
something in the configuration process is missing or wrong.
quoted from Dan Vande More
I would venture to guess that as long as your test/column names stay
the same, there will be no problems in switching from --extra-tests to
ncv.

The second step, of course, is actually graphing it using data from
the rrd. I found this to be the most difficult step, if only because I
skim documentation - I don't read unless I'm desperate. Again, I'm
going out on a limb to say as long as your datasources/testnames/Y
values are all the same, your graph configuration should work post-ncv
conversion.

Good luck
Thanks.
Dan
-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Dan Vande More · Sun, 13 Nov 2005 02:18:50 -0600 ·
quoted from Rich Smrcina
On 11/12/05, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
Dan Vande More wrote:
Custom graphing (with ncv) is really a two step process. The first and
most important is collecting the data into an rrd, which is simple and
done by adding your COLUMNNAME=ncv to TEST2RRD and correctly passing
data back to hobbit:)
I used "rrdtool dump foo.rrd > tmp.xml" to verify that it was actually
collecting some data.
My rrd file isn't even being updated.  That leads me to believe that
something in the configuration process is missing or wrong.
Ok, I'll share how I "debugged" hobbit, but only if you promise not to
laugh. I'm a seek and destroy debugger, so I add printfs inside of
loops I think should be executed, and if they're not executed, I'll
find out why. Since this isn't perl, it's not as easy as 'print "I'm
executing loop foo...\n"'. Fortunately, Henrick has made it almost as
easy. Instead of print/printf/sprintf, hobbit has an errprintf
function that works quite handily.

My recommendations are these:

#1. Get into your hobbit source directory, I'd assume something like:
/home/hobbit/hobbit-4.1.2.
#2. Put a line in hobbitd/do_rrd.c on or about line 250 (Which is
where you see the if and else ifs, you want to be _above_ these. My
line is something like:

***
        if      (strcmp(id, "ncv") == 0)       errprintf("hostname %s,
testname %s qualifies for an ncv with id %s\n", hostname, testname,
id);
***
Note: There's a strcmp(id, ncv) later on, but it won't affect this test.

#3. Now, assuing your TEST2RRD is working, hobbit will log that (more
on that later). A bit further down in do_rrd.c, if it matches ncv, it
will pass that on to a function appropriately named do_ncv_rrd(). Now,
edit hobbitd/rrd/do_ncv.c and add a line on our about line 32 that
says something like:

***
errprintf("hostname %s testname %s msg %s made ncv\n", hostname, testname, msg);
***
(Just to know you got inside of the do_ncv function.)

#4. On our about line 58, which is clearly after it assigns name &
value (From your msg: 'name : value' or 'name = value'), add a line
like:

***
errprintf("hostname %s testname %s msg %s had name/value of %s : %s",
hostname, testname, msg, name, value);
***

#5. Re-compile hobbit so these changes take effect. My line was something like:
***
sudo make clean && sudo make && sudo make install && sudo rm
/var/log/hobbit/rrd-status.log && sudo -u hobbit
/home/hobbit/server/hobbit.sh stop && sudo -u hobbit
/home/hobbit/server/hobbit.sh start
**

Ok, that's it.  If any of your steps didn't log all of those messages,
it didn't make it that far. Troubleshoot these backwards. Now,
errprintf seems smart enought to know which module it's running under,
so it will log to the appropriate modules' log. In this case, you'll
find these messages under /var/log/hobbit/rrd-status.log. Look for the
tests you're running and if these lines show up in that log file.

If I were any smarter, I would have made some kinda "if
(defined(debug_ncv)) errprintf(foo)" lines around these three (or
more) areas and submitted the diffs to the project for inclusion, but
alas, I was too hurried.

If you get stuck or have questions, just ask.

Good luck.

Dan
quoted from Rich Smrcina

I would venture to guess that as long as your test/column names stay
the same, there will be no problems in switching from --extra-tests to
ncv.

The second step, of course, is actually graphing it using data from
the rrd. I found this to be the most difficult step, if only because I
skim documentation - I don't read unless I'm desperate. Again, I'm
going out on a limb to say as long as your datasources/testnames/Y
values are all the same, your graph configuration should work post-ncv
conversion.

Good luck
Thanks.
Dan
--
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006

list Rich Smrcina · Sun, 13 Nov 2005 06:12:51 -0600 ·
Great detail Dan, thanks for all of the info.  I'll give it a try later 
this afternoon.
quoted from Dan Vande More

Dan Vande More wrote:
On 11/12/05, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
Dan Vande More wrote:
Custom graphing (with ncv) is really a two step process. The first and
most important is collecting the data into an rrd, which is simple and
done by adding your COLUMNNAME=ncv to TEST2RRD and correctly passing
data back to hobbit:)
I used "rrdtool dump foo.rrd > tmp.xml" to verify that it was actually
collecting some data.
My rrd file isn't even being updated.  That leads me to believe that
something in the configuration process is missing or wrong.

Ok, I'll share how I "debugged" hobbit, but only if you promise not to
laugh. I'm a seek and destroy debugger, so I add printfs inside of
loops I think should be executed, and if they're not executed, I'll
find out why. Since this isn't perl, it's not as easy as 'print "I'm
executing loop foo...\n"'. Fortunately, Henrick has made it almost as
easy. Instead of print/printf/sprintf, hobbit has an errprintf
function that works quite handily.

My recommendations are these:

#1. Get into your hobbit source directory, I'd assume something like:
/home/hobbit/hobbit-4.1.2.
#2. Put a line in hobbitd/do_rrd.c on or about line 250 (Which is
where you see the if and else ifs, you want to be _above_ these. My
line is something like:

***
        if      (strcmp(id, "ncv") == 0)       errprintf("hostname %s,
testname %s qualifies for an ncv with id %s\n", hostname, testname,
id);
***
Note: There's a strcmp(id, ncv) later on, but it won't affect this test.

#3. Now, assuing your TEST2RRD is working, hobbit will log that (more
on that later). A bit further down in do_rrd.c, if it matches ncv, it
will pass that on to a function appropriately named do_ncv_rrd(). Now,
edit hobbitd/rrd/do_ncv.c and add a line on our about line 32 that
says something like:

***
errprintf("hostname %s testname %s msg %s made ncv\n", hostname, testname, msg);
***
(Just to know you got inside of the do_ncv function.)

#4. On our about line 58, which is clearly after it assigns name &
value (From your msg: 'name : value' or 'name = value'), add a line
like:

***
errprintf("hostname %s testname %s msg %s had name/value of %s : %s",
hostname, testname, msg, name, value);
***

#5. Re-compile hobbit so these changes take effect. My line was something like:
***
sudo make clean && sudo make && sudo make install && sudo rm
/var/log/hobbit/rrd-status.log && sudo -u hobbit
/home/hobbit/server/hobbit.sh stop && sudo -u hobbit
/home/hobbit/server/hobbit.sh start
**

Ok, that's it.  If any of your steps didn't log all of those messages,
it didn't make it that far. Troubleshoot these backwards. Now,
errprintf seems smart enought to know which module it's running under,
so it will log to the appropriate modules' log. In this case, you'll
find these messages under /var/log/hobbit/rrd-status.log. Look for the
tests you're running and if these lines show up in that log file.

If I were any smarter, I would have made some kinda "if
(defined(debug_ncv)) errprintf(foo)" lines around these three (or
more) areas and submitted the diffs to the project for inclusion, but
alas, I was too hurried.

If you get stuck or have questions, just ask.

Good luck.

Dan

I would venture to guess that as long as your test/column names stay
the same, there will be no problems in switching from --extra-tests to
ncv.

The second step, of course, is actually graphing it using data from
the rrd. I found this to be the most difficult step, if only because I
skim documentation - I don't read unless I'm desperate. Again, I'm
going out on a limb to say as long as your datasources/testnames/Y
values are all the same, your graph configuration should work post-ncv
conversion.

Good luck
Thanks.

Dan
--
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006

-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Rich Smrcina · Mon, 14 Nov 2005 06:35:22 -0600 ·
OK, I think I've found the problem.  The NCV routine strips out anything 
that isn't a letter or a number from the column name.

I found this message in the log:

2005-11-13 22:01:21 RRD error updating 
/home/hobbit/data/rrd/vm1/pg_util.rrd from 192.168.201.1: unknown DS 
name 'pgutil'
quoted from Dan Vande More

Dan Vande More wrote:
On 11/12/05, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
Dan Vande More wrote:
Custom graphing (with ncv) is really a two step process. The first and
most important is collecting the data into an rrd, which is simple and
done by adding your COLUMNNAME=ncv to TEST2RRD and correctly passing
data back to hobbit:)
I used "rrdtool dump foo.rrd > tmp.xml" to verify that it was actually
collecting some data.
My rrd file isn't even being updated.  That leads me to believe that
something in the configuration process is missing or wrong.

Ok, I'll share how I "debugged" hobbit, but only if you promise not to
laugh. I'm a seek and destroy debugger, so I add printfs inside of
loops I think should be executed, and if they're not executed, I'll
find out why. Since this isn't perl, it's not as easy as 'print "I'm
executing loop foo...\n"'. Fortunately, Henrick has made it almost as
easy. Instead of print/printf/sprintf, hobbit has an errprintf
function that works quite handily.

My recommendations are these:

#1. Get into your hobbit source directory, I'd assume something like:
/home/hobbit/hobbit-4.1.2.
#2. Put a line in hobbitd/do_rrd.c on or about line 250 (Which is
where you see the if and else ifs, you want to be _above_ these. My
line is something like:

***
        if      (strcmp(id, "ncv") == 0)       errprintf("hostname %s,
testname %s qualifies for an ncv with id %s\n", hostname, testname,
id);
***
Note: There's a strcmp(id, ncv) later on, but it won't affect this test.

#3. Now, assuing your TEST2RRD is working, hobbit will log that (more
on that later). A bit further down in do_rrd.c, if it matches ncv, it
will pass that on to a function appropriately named do_ncv_rrd(). Now,
edit hobbitd/rrd/do_ncv.c and add a line on our about line 32 that
says something like:

***
errprintf("hostname %s testname %s msg %s made ncv\n", hostname, testname, msg);
***
(Just to know you got inside of the do_ncv function.)

#4. On our about line 58, which is clearly after it assigns name &
value (From your msg: 'name : value' or 'name = value'), add a line
like:

***
errprintf("hostname %s testname %s msg %s had name/value of %s : %s",
hostname, testname, msg, name, value);
***

#5. Re-compile hobbit so these changes take effect. My line was something like:
***
sudo make clean && sudo make && sudo make install && sudo rm
/var/log/hobbit/rrd-status.log && sudo -u hobbit
/home/hobbit/server/hobbit.sh stop && sudo -u hobbit
/home/hobbit/server/hobbit.sh start
**

Ok, that's it.  If any of your steps didn't log all of those messages,
it didn't make it that far. Troubleshoot these backwards. Now,
errprintf seems smart enought to know which module it's running under,
so it will log to the appropriate modules' log. In this case, you'll
find these messages under /var/log/hobbit/rrd-status.log. Look for the
tests you're running and if these lines show up in that log file.

If I were any smarter, I would have made some kinda "if
(defined(debug_ncv)) errprintf(foo)" lines around these three (or
more) areas and submitted the diffs to the project for inclusion, but
alas, I was too hurried.

If you get stuck or have questions, just ask.

Good luck.

Dan

I would venture to guess that as long as your test/column names stay
the same, there will be no problems in switching from --extra-tests to
ncv.

The second step, of course, is actually graphing it using data from
the rrd. I found this to be the most difficult step, if only because I
skim documentation - I don't read unless I'm desperate. Again, I'm
going out on a limb to say as long as your datasources/testnames/Y
values are all the same, your graph configuration should work post-ncv
conversion.

Good luck
Thanks.

Dan
--
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006

-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Dan Vande More · Mon, 14 Nov 2005 08:08:00 -0600 ·
Oh man, I can't believe I missed that when you asked me. I almost
suffered from the same problem, too. You are right, those underscores
are not allowed and stripped out. You should be able to update your
rrd ds to not have underscores by exporting to xml (rrdtool dump
foo.rrd > foo.xml), search and replace, import from xml (rrdtool
restore foo.xml foo.rrd) to rrd.
quoted from Rich Smrcina


On 11/14/05, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
OK, I think I've found the problem.  The NCV routine strips out anything
that isn't a letter or a number from the column name.

I found this message in the log:

2005-11-13 22:01:21 RRD error updating
/home/hobbit/data/rrd/vm1/pg_util.rrd from 192.168.201.1: unknown DS
name 'pgutil'

Dan Vande More wrote:
On 11/12/05, Rich Smrcina <user-cf452ff334e0@xymon.invalid> wrote:
Dan Vande More wrote:
Custom graphing (with ncv) is really a two step process. The first and
most important is collecting the data into an rrd, which is simple and
done by adding your COLUMNNAME=ncv to TEST2RRD and correctly passing
data back to hobbit:)
I used "rrdtool dump foo.rrd > tmp.xml" to verify that it was actually
collecting some data.
My rrd file isn't even being updated.  That leads me to believe that
something in the configuration process is missing or wrong.

Ok, I'll share how I "debugged" hobbit, but only if you promise not to
laugh. I'm a seek and destroy debugger, so I add printfs inside of
loops I think should be executed, and if they're not executed, I'll
find out why. Since this isn't perl, it's not as easy as 'print "I'm
executing loop foo...\n"'. Fortunately, Henrick has made it almost as
easy. Instead of print/printf/sprintf, hobbit has an errprintf
function that works quite handily.

My recommendations are these:

#1. Get into your hobbit source directory, I'd assume something like:
/home/hobbit/hobbit-4.1.2.
#2. Put a line in hobbitd/do_rrd.c on or about line 250 (Which is
where you see the if and else ifs, you want to be _above_ these. My
line is something like:

***
        if      (strcmp(id, "ncv") == 0)       errprintf("hostname %s,
testname %s qualifies for an ncv with id %s\n", hostname, testname,
id);
***
Note: There's a strcmp(id, ncv) later on, but it won't affect this test.

#3. Now, assuing your TEST2RRD is working, hobbit will log that (more
on that later). A bit further down in do_rrd.c, if it matches ncv, it
will pass that on to a function appropriately named do_ncv_rrd(). Now,
edit hobbitd/rrd/do_ncv.c and add a line on our about line 32 that
says something like:

***
errprintf("hostname %s testname %s msg %s made ncv\n", hostname, testname, msg);
***
(Just to know you got inside of the do_ncv function.)

#4. On our about line 58, which is clearly after it assigns name &
value (From your msg: 'name : value' or 'name = value'), add a line
like:

***
errprintf("hostname %s testname %s msg %s had name/value of %s : %s",
hostname, testname, msg, name, value);
***

#5. Re-compile hobbit so these changes take effect. My line was something like:
***
sudo make clean && sudo make && sudo make install && sudo rm
/var/log/hobbit/rrd-status.log && sudo -u hobbit
/home/hobbit/server/hobbit.sh stop && sudo -u hobbit
/home/hobbit/server/hobbit.sh start
**

Ok, that's it.  If any of your steps didn't log all of those messages,
it didn't make it that far. Troubleshoot these backwards. Now,
errprintf seems smart enought to know which module it's running under,
so it will log to the appropriate modules' log. In this case, you'll
find these messages under /var/log/hobbit/rrd-status.log. Look for the
tests you're running and if these lines show up in that log file.

If I were any smarter, I would have made some kinda "if
(defined(debug_ncv)) errprintf(foo)" lines around these three (or
more) areas and submitted the diffs to the project for inclusion, but
alas, I was too hurried.

If you get stuck or have questions, just ask.

Good luck.

Dan

I would venture to guess that as long as your test/column names stay
the same, there will be no problems in switching from --extra-tests to
ncv.

The second step, of course, is actually graphing it using data from
the rrd. I found this to be the most difficult step, if only because I
skim documentation - I don't read unless I'm desperate. Again, I'm
going out on a limb to say as long as your datasources/testnames/Y
values are all the same, your graph configuration should work post-ncv
conversion.

Good luck
Thanks.

Dan
--
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006

--
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006

list Henrik Størner · Mon, 14 Nov 2005 15:34:54 +0100 ·
quoted from Rich Smrcina
On Mon, Nov 14, 2005 at 06:35:22AM -0600, Rich Smrcina wrote:
OK, I think I've found the problem.  The NCV routine strips out anything that isn't a letter or a number from the column name.

I found this message in the log:

2005-11-13 22:01:21 RRD error updating /home/hobbit/data/rrd/vm1/pg_util.rrd from 192.168.201.1: unknown DS name 'pgutil'
That is because the RRD library only allows data-set names to contain
letters and numbers.


Henrik
list Rich Smrcina · Mon, 14 Nov 2005 08:54:07 -0600 ·
Perhaps the underscore is also considered a valid character. I can process dataset names with underscores using the extra tests and script.   Also, I changed do_ncv.c to allow underscores in the dataset name.

             if ( ((*inp >= 'A') && (*inp <= 'Z')) ||
                  ((*inp >= 'a') && (*inp <= 'z')) ||
                  ((*inp >= '0') && (*inp <= '9')) ||
                  ((*inp == '_') ) ) {


Here's a dump from my rrd file:

hobbit at hobbit:~/data/rrd/vm1> rrdtool fetch pg_util.rrd AVERAGE -r 900 -s -60m
                         pg_util

1131975600: 1.0000000000e+00
1131975900: 1.0000000000e+00
1131976200: 1.0000000000e+00

Now that my rrd file is being updated, I have to figure out why the graph isn't appearing.
quoted from Henrik Størner

Henrik Stoerner wrote:
On Mon, Nov 14, 2005 at 06:35:22AM -0600, Rich Smrcina wrote:
OK, I think I've found the problem.  The NCV routine strips out anything that isn't a letter or a number from the column name.

I found this message in the log:

2005-11-13 22:01:21 RRD error updating /home/hobbit/data/rrd/vm1/pg_util.rrd from 192.168.201.1: unknown DS name 'pgutil'

That is because the RRD library only allows data-set names to contain
letters and numbers.


Henrik

-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Henrik Størner · Mon, 14 Nov 2005 16:43:40 +0100 ·
quoted from Rich Smrcina
On Mon, Nov 14, 2005 at 08:54:07AM -0600, Rich Smrcina wrote:
Perhaps the underscore is also considered a valid character. I can 
process dataset names with underscores using the extra tests and script. 
 Also, I changed do_ncv.c to allow underscores in the dataset name.

            if ( ((*inp >= 'A') && (*inp <= 'Z')) ||
                 ((*inp >= 'a') && (*inp <= 'z')) ||
                 ((*inp >= '0') && (*inp <= '9')) ||
                 ((*inp == '_') ) ) {
Ah - you're right, the rrdcreate(1) man-page says as much. Missed that
when I first did the NCV module.

I've fixed that in my code.


Regards,
Henrik
list Rich Smrcina · Mon, 14 Nov 2005 09:55:10 -0600 ·
Thanks, Henrik!

Henrik Stoerner wrote:
On Mon, Nov 14, 2005 at 08:54:07AM -0600, Rich Smrcina wrote:
Perhaps the underscore is also considered a valid character. I can process dataset names with underscores using the extra tests and script. Also, I changed do_ncv.c to allow underscores in the dataset name.

           if ( ((*inp >= 'A') && (*inp <= 'Z')) ||
                ((*inp >= 'a') && (*inp <= 'z')) ||
                ((*inp >= '0') && (*inp <= '9')) ||
                ((*inp == '_') ) ) {
Ah - you're right, the rrdcreate(1) man-page says as much. Missed that
when I first did the NCV module.

I've fixed that in my code.


Regards,
Henrik

-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2006 - Chattanooga, TN - April 7-11, 2006
list Ger Maguire · Wed, 29 Nov 2006 20:12:39 -0000 ·
Hi folks,
 
I have created a custom script for capturing CPU utilisation from a device
and updated all the relevant files but I cannot get my rrd files to update
correctly.
 
An initial rrd file gets created but the data does not get input into it.
 
I have created a rrd-ext sript which is running and is capturing the
incomming status data and by looking at the /tmp files I can see that the
echo outputs are being generated correctly every 5 mintes.
 
----> rrd-ext.sh
 
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
 
if [ "$TESTNAME" = "acpu" ]
then
        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        # Analyze the message we got
        # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"." -f1`
        # The RRD dataset definitions
        echo "DS:acpu:GAUGE:600:0:100"
        # The filename
        echo "acpu.rrd"
        # The data
        echo "$ACPU"
        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
fi
 
 
The value I want to graph is simply a cpu % counter, have I got the above
values and setting correct for this ?
 
Any help or pointers appreciated.
 
 
Output that this produces is below showing that it is getting the data
correctly from the status input.
 
---> /tmp/hobbit.$HOSTNAME.$TESTNAME
 
Wed Nov 29 19:54:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_13879
14
Wed Nov 29 19:59:05 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_26569
25
Wed Nov 29 20:04:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_2788
17
Wed Nov 29 20:09:12 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_11944
9

 
Ger.
list Buchan Milne · Thu, 30 Nov 2006 17:38:55 +0200 ·
quoted from Ger Maguire
On Wednesday 29 November 2006 22:12, Ger Maguire wrote:
Hi folks,

I have created a custom script for capturing CPU utilisation from a device
and updated all the relevant files but I cannot get my rrd files to update
correctly.
In general, the cpu test is parsed by hobbit, for which Hobbit needs to know the format. If you can fake the format to be like something Hobbit already supports, then you can use the "cpu testname".
quoted from Ger Maguire
An initial rrd file gets created but the data does not get input into it.

I have created a rrd-ext sript which is running and is capturing the
incomming status data and by looking at the /tmp files I can see that the
echo outputs are being generated correctly every 5 mintes.
IMHO, it would be much easier to use the ncv module to do this. Please see Help->Custom Graphs on the Hobbit web interface for more information on how to do this.

Regards,
Buchan


-- 
Buchan Milne
ISP Systems Specialist - Monitoring/Authentication Team Leader
B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)
list Ger Maguire · Thu, 30 Nov 2006 19:44:16 -0000 ·
Guys, When creating custom scripts, has anyone just used rrdcreate and
rrdtool update to directly output the data to the rrd files ?
 
If the the tests are all residing on the one machine and not polling data
from other clients is it an easier way to update the graphs as I just can't
get the status script to update for me ?
 
Thanks,
Ger.
quoted from Ger Maguire


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: 29 November 2006 20:13
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Custom RRD graphs


Hi folks,
 
I have created a custom script for capturing CPU utilisation from a device
and updated all the relevant files but I cannot get my rrd files to update
correctly.
 
An initial rrd file gets created but the data does not get input into it.
 
I have created a rrd-ext sript which is running and is capturing the
incomming status data and by looking at the /tmp files I can see that the
echo outputs are being generated correctly every 5 mintes.
 
----> rrd-ext.sh
 
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
 
if [ "$TESTNAME" = "acpu" ]
then
        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        # Analyze the message we got
        # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"." -f1`
        # The RRD dataset definitions
        echo "DS:acpu:GAUGE:600:0:100"
        # The filename
        echo "acpu.rrd"
        # The data
        echo "$ACPU"
        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
fi
 
 
The value I want to graph is simply a cpu % counter, have I got the above
values and setting correct for this ?
 
Any help or pointers appreciated.
 
 
Output that this produces is below showing that it is getting the data
correctly from the status input.
 
---> /tmp/hobbit.$HOSTNAME.$TESTNAME
 
Wed Nov 29 19:54:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_13879
14
Wed Nov 29 19:59:05 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_26569
25
Wed Nov 29 20:04:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_2788
17
Wed Nov 29 20:09:12 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_11944
9

 
Ger.
list Greg L Hubbard · Thu, 30 Nov 2006 13:55:03 -0600 ·
Why bother when Hobbit will use your echo output to do that?
 
But there is more to graphing than simply creating the RRD files.  Next
you have to create graph definitions that will use your new files, and
these graphs have to work.  Then you can add your new graphs to the
Hobbit server so they will show up with the associated test (TEST2RRD
variable) and/or in the trends display.
 
You say you see the data being echoed -- are the RRD files not getting
created/updated?  Did you add your rrd-ext to the right place on the
server?  Did you add it to hobbit-rrd for both data and status messages?
 
(or whatever, I am going from dim memory)
 
GLH
quoted from Ger Maguire


	From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
	Sent: Thursday, November 30, 2006 1:44 PM
	To: user-ae9b8668bcde@xymon.invalid
	Subject: RE: [hobbit] Custom RRD graphs
	
	
	Guys, When creating custom scripts, has anyone just used
rrdcreate and rrdtool update to directly output the data to the rrd
files ?
	 
	If the the tests are all residing on the one machine and not
polling data from other clients is it an easier way to update the graphs
as I just can't get the status script to update for me ?
	 
	Thanks,
	Ger.


	From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
	Sent: 29 November 2006 20:13
	To: user-ae9b8668bcde@xymon.invalid
	Subject: [hobbit] Custom RRD graphs
	
	
	Hi folks,
	 
	I have created a custom script for capturing CPU utilisation
from a device and updated all the relevant files but I cannot get my rrd
files to update correctly.
	 
	An initial rrd file gets created but the data does not get input
into it.
	 
	I have created a rrd-ext sript which is running and is capturing
the incomming status data and by looking at the /tmp files I can see
that the echo outputs are being generated correctly every 5 mintes.
	 
	----> rrd-ext.sh
	 
	HOSTNAME="$1"
	TESTNAME="$2"
	FNAME="$3"
	 
	if [ "$TESTNAME" = "acpu" ]
	then
	        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
	        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
	        # Analyze the message we got
	        # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
	        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"."
-f1`
	        # The RRD dataset definitions
	        echo "DS:acpu:GAUGE:600:0:100"
	        # The filename
	        echo "acpu.rrd"
	        # The data
	        echo "$ACPU"
	        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
	fi
	 
	 
	The value I want to graph is simply a cpu % counter, have I got
the above values and setting correct for this ?
	 
	Any help or pointers appreciated.
	 
	 
	Output that this produces is below showing that it is getting
the data correctly from the status input.
	 
	---> /tmp/hobbit.$HOSTNAME.$TESTNAME
	 
	Wed Nov 29 19:54:07 GMT 2006
	/usr/lib/hobbit/server/tmp/rrd_msg_13879
	14
	Wed Nov 29 19:59:05 GMT 2006
	/usr/lib/hobbit/server/tmp/rrd_msg_26569
	25
	Wed Nov 29 20:04:07 GMT 2006
	/usr/lib/hobbit/server/tmp/rrd_msg_2788
	17
	Wed Nov 29 20:09:12 GMT 2006
	/usr/lib/hobbit/server/tmp/rrd_msg_11944
	9
	
	 
	Ger.
list Ger Maguire · Thu, 30 Nov 2006 20:16:55 -0000 ·
I think I have gone through all the steps and have poured over the docs and
manpages
 
So far:
 
1 Created custom script outputing data to hobbit using status switch
 
$BBHOME/bin/bb $BBDISP "status $HOST.$TEST $COLOUR $OUTPUT"

 
2 Created rrd-ext script and have it getting data as per below (numeric vale
for catching a % value)
 
 
3 Modified hobbitserver.cfg
 
Added acpu test to TEST2RRD="cpu=la,disk, ... ,acpu"
 
Added acpu test to GRAPHS="la,disk, ... ,acpu"
 
 
4 Modified hobbitlaunch.cfg

[rrdstatus]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD hobbitd_channel --channel=status
--log=$BBSERVERLOGS/rrd-status.log
        hobbitd_rrd --rrddir=$BBVAR/rrd
--extra-script=/usr/lib/hobbit/server/ext/rrd-ext.sh --extra-tests=acpu

 
I haven't modified [rrddata] as I'm sending the data in using the status
command but I'll stick it in and see if it makes a difference.

Added the test itself to hobbitlaunch to run every 5 mins, all works ok
pages update in hobbit
 
[acpu]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD $BBHOME/ext/acpu.sh
        INTERVAL 5m

 
5 Modified hobbitgraph.cfg with the following
 
[acpu]
        TITLE CPU Utilisation
        YAXIS % Load
        DEF:acpu=acpu.rrd:acpu:AVERAGE
        AREA:acpu#00CC00:Utilisation
        GPRINT:acpu:LAST: \: %5.1lf%s (cur)
        GPRINT:acpu:MAX: \: %5.1lf%s (max)
        GPRINT:acpu:MIN: \: %5.1lf%s (min)
        GPRINT:acpu:AVERAGE: \: %5.1lf%s (avg)\n
 
 
The rrd files get created in the correct place and the pages in hobbit show
the graph but there is just no data being displayed and the timestamp on the
acpu.rrd files is showing they are not being updated.
 
This is where I'm stumped, the log files don't show any relevant info or
messages to point me to anything thats wrong.
 
I'm running it on debian sarge distro using the .deb package from
sourceforge.
 
 
Ger.
quoted from Greg L Hubbard
 
 
From: Hubbard, Greg L [mailto:user-d970b5e56ec9@xymon.invalid] 
Sent: 30 November 2006 19:55
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Why bother when Hobbit will use your echo output to do that?
 
But there is more to graphing than simply creating the RRD files.  Next you
have to create graph definitions that will use your new files, and these
graphs have to work.  Then you can add your new graphs to the Hobbit server
so they will show up with the associated test (TEST2RRD variable) and/or in
the trends display.
 
You say you see the data being echoed -- are the RRD files not getting
created/updated?  Did you add your rrd-ext to the right place on the server?
Did you add it to hobbit-rrd for both data and status messages?
 
(or whatever, I am going from dim memory)
 
GLH


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: Thursday, November 30, 2006 1:44 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Guys, When creating custom scripts, has anyone just used rrdcreate and
rrdtool update to directly output the data to the rrd files ?
 
If the the tests are all residing on the one machine and not polling data
from other clients is it an easier way to update the graphs as I just can't
get the status script to update for me ?
 
Thanks,
Ger.


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: 29 November 2006 20:13
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Custom RRD graphs


Hi folks,
 
I have created a custom script for capturing CPU utilisation from a device
and updated all the relevant files but I cannot get my rrd files to update
correctly.
 
An initial rrd file gets created but the data does not get input into it.
 
I have created a rrd-ext sript which is running and is capturing the
incomming status data and by looking at the /tmp files I can see that the
echo outputs are being generated correctly every 5 mintes.
 
----> rrd-ext.sh
 
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
 
if [ "$TESTNAME" = "acpu" ]
then
        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        # Analyze the message we got
        # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"." -f1`
        # The RRD dataset definitions
        echo "DS:acpu:GAUGE:600:0:100"
        # The filename
        echo "acpu.rrd"
        # The data
        echo "$ACPU"
        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
fi
 
 
The value I want to graph is simply a cpu % counter, have I got the above
values and setting correct for this ?
 
Any help or pointers appreciated.
 
 
Output that this produces is below showing that it is getting the data
correctly from the status input.
 
---> /tmp/hobbit.$HOSTNAME.$TESTNAME
 
Wed Nov 29 19:54:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_13879
14
Wed Nov 29 19:59:05 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_26569
25
Wed Nov 29 20:04:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_2788
17
Wed Nov 29 20:09:12 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_11944
9

 
Ger.
list Greg L Hubbard · Thu, 30 Nov 2006 14:35:15 -0600 ·
Sounds good -- you have almost written a tutorial on how to add custom
graphs
 
So what is in your temp file?  I usually write this stuff to a log file.
quoted from Ger Maguire
 
GLH

From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: Thursday, November 30, 2006 2:17 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


	I think I have gone through all the steps and have poured over
the docs and manpages
	 
	So far:
	 
	1 Created custom script outputing data to hobbit using status
switch
	 
	$BBHOME/bin/bb $BBDISP "status $HOST.$TEST $COLOUR $OUTPUT"
	
	 
	2 Created rrd-ext script and have it getting data as per below
(numeric vale for catching a % value)
	 
	 
	3 Modified hobbitserver.cfg
	 
	Added acpu test to TEST2RRD="cpu=la,disk, ... ,acpu"
	 
	
	Added acpu test to GRAPHS="la,disk, ... ,acpu"
	 
	 
	4 Modified hobbitlaunch.cfg
	
	[rrdstatus]
	        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
	        NEEDS hobbitd
	        CMD hobbitd_channel --channel=status
--log=$BBSERVERLOGS/rrd-status.log
	        hobbitd_rrd --rrddir=$BBVAR/rrd
--extra-script=/usr/lib/hobbit/server/ext/rrd-ext.sh --extra-tests=acpu
	
	 
	I haven't modified [rrddata] as I'm sending the data in using
the status command but I'll stick it in and see if it makes a
difference.
	
	
	Added the test itself to hobbitlaunch to run every 5 mins, all
works ok pages update in hobbit
	 
	[acpu]
	        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
	        NEEDS hobbitd
	        CMD $BBHOME/ext/acpu.sh
	        INTERVAL 5m
	
	 
	5 Modified hobbitgraph.cfg with the following
	 
	[acpu]
	        TITLE CPU Utilisation
	        YAXIS % Load
	        DEF:acpu=acpu.rrd:acpu:AVERAGE
	        AREA:acpu#00CC00:Utilisation
	        GPRINT:acpu:LAST: \: %5.1lf%s (cur)
	        GPRINT:acpu:MAX: \: %5.1lf%s (max)
	        GPRINT:acpu:MIN: \: %5.1lf%s (min)
	        GPRINT:acpu:AVERAGE: \: %5.1lf%s (avg)\n
	 
	 
	The rrd files get created in the correct place and the pages in
hobbit show the graph but there is just no data being displayed and the
timestamp on the acpu.rrd files is showing they are not being updated.
	 
	This is where I'm stumped, the log files don't show any relevant
info or messages to point me to anything thats wrong.
	 
	I'm running it on debian sarge distro using the .deb package
from sourceforge.
	 
	 
	Ger.
	 
	 
	From: Hubbard, Greg L [mailto:user-d970b5e56ec9@xymon.invalid] 
	Sent: 30 November 2006 19:55
	To: user-ae9b8668bcde@xymon.invalid
	Subject: RE: [hobbit] Custom RRD graphs
	
	
	Why bother when Hobbit will use your echo output to do that?
	 
	But there is more to graphing than simply creating the RRD
files.  Next you have to create graph definitions that will use your new
files, and these graphs have to work.  Then you can add your new graphs
to the Hobbit server so they will show up with the associated test
(TEST2RRD variable) and/or in the trends display.
	 
	You say you see the data being echoed -- are the RRD files not
getting created/updated?  Did you add your rrd-ext to the right place on
the server?  Did you add it to hobbit-rrd for both data and status
messages?
	 
	(or whatever, I am going from dim memory)
	 
	GLH


		From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
		Sent: Thursday, November 30, 2006 1:44 PM
		To: user-ae9b8668bcde@xymon.invalid
		Subject: RE: [hobbit] Custom RRD graphs
		
		
		Guys, When creating custom scripts, has anyone just used
rrdcreate and rrdtool update to directly output the data to the rrd
files ?
		 
		If the the tests are all residing on the one machine and
not polling data from other clients is it an easier way to update the
graphs as I just can't get the status script to update for me ?
		 
		Thanks,
		Ger.


		From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
		Sent: 29 November 2006 20:13
		To: user-ae9b8668bcde@xymon.invalid
		Subject: [hobbit] Custom RRD graphs
		
		
		Hi folks,
		 
		I have created a custom script for capturing CPU
utilisation from a device and updated all the relevant files but I
cannot get my rrd files to update correctly.
		 
		An initial rrd file gets created but the data does not
get input into it.
		 
		I have created a rrd-ext sript which is running and is
capturing the incomming status data and by looking at the /tmp files I
can see that the echo outputs are being generated correctly every 5
mintes.
		 
		----> rrd-ext.sh
		 
		HOSTNAME="$1"
		TESTNAME="$2"
		FNAME="$3"
		 
		if [ "$TESTNAME" = "acpu" ]
		then
		        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
		        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
		        # Analyze the message we got
		        # ACPU=`grep "connected" $FNAME | awk '{print
$14}'`
		        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut
-d"." -f1`
		        # The RRD dataset definitions
		        echo "DS:acpu:GAUGE:600:0:100"
		        # The filename
		        echo "acpu.rrd"
		        # The data
		        echo "$ACPU"
		        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
		fi
		 
		 
		The value I want to graph is simply a cpu % counter,
have I got the above values and setting correct for this ?
		 
		Any help or pointers appreciated.
		 
		 
		Output that this produces is below showing that it is
getting the data correctly from the status input.
		 
		---> /tmp/hobbit.$HOSTNAME.$TESTNAME
		 
		Wed Nov 29 19:54:07 GMT 2006
		/usr/lib/hobbit/server/tmp/rrd_msg_13879
		14
		Wed Nov 29 19:59:05 GMT 2006
		/usr/lib/hobbit/server/tmp/rrd_msg_26569
		25
		Wed Nov 29 20:04:07 GMT 2006
		/usr/lib/hobbit/server/tmp/rrd_msg_2788
		17
		Wed Nov 29 20:09:12 GMT 2006
		/usr/lib/hobbit/server/tmp/rrd_msg_11944
		9
		
		 
		Ger.
list Ger Maguire · Thu, 30 Nov 2006 20:49:19 -0000 ·
Sorry Greg, which temp file, brain is getting a bit fried here :-)
 
The /tmp log file which the rrd-ext.sh is outputting to is showing which
means the data is comming in from the BB status command every time the
scripts run.
 
 
Thu Nov 30 20:31:35 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_400
18
Thu Nov 30 20:36:36 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_9081
17
Thu Nov 30 20:38:35 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_13633
13
Thu Nov 30 20:43:35 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_24605
14
quoted from Greg L Hubbard

Ger.
 

From: Hubbard, Greg L [mailto:user-d970b5e56ec9@xymon.invalid] 
Sent: 30 November 2006 20:35
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Sounds good -- you have almost written a tutorial on how to add custom
graphs
 
So what is in your temp file?  I usually write this stuff to a log file.
 
GLH

From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: Thursday, November 30, 2006 2:17 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


I think I have gone through all the steps and have poured over the docs and
manpages
 
So far:
 
1 Created custom script outputing data to hobbit using status switch
 
$BBHOME/bin/bb $BBDISP "status $HOST.$TEST $COLOUR $OUTPUT"

 
2 Created rrd-ext script and have it getting data as per below (numeric vale
for catching a % value)
 
 
3 Modified hobbitserver.cfg
 
Added acpu test to TEST2RRD="cpu=la,disk, ... ,acpu"
 

Added acpu test to GRAPHS="la,disk, ... ,acpu"
 
 
4 Modified hobbitlaunch.cfg

[rrdstatus]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD hobbitd_channel --channel=status
--log=$BBSERVERLOGS/rrd-status.log
        hobbitd_rrd --rrddir=$BBVAR/rrd
--extra-script=/usr/lib/hobbit/server/ext/rrd-ext.sh --extra-tests=acpu

 
I haven't modified [rrddata] as I'm sending the data in using the status
command but I'll stick it in and see if it makes a difference.


Added the test itself to hobbitlaunch to run every 5 mins, all works ok
pages update in hobbit
 
[acpu]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD $BBHOME/ext/acpu.sh
        INTERVAL 5m

 
5 Modified hobbitgraph.cfg with the following
 
[acpu]
        TITLE CPU Utilisation
        YAXIS % Load
        DEF:acpu=acpu.rrd:acpu:AVERAGE
        AREA:acpu#00CC00:Utilisation
        GPRINT:acpu:LAST: \: %5.1lf%s (cur)
        GPRINT:acpu:MAX: \: %5.1lf%s (max)
        GPRINT:acpu:MIN: \: %5.1lf%s (min)
        GPRINT:acpu:AVERAGE: \: %5.1lf%s (avg)\n
 
 
The rrd files get created in the correct place and the pages in hobbit show
the graph but there is just no data being displayed and the timestamp on the
acpu.rrd files is showing they are not being updated.
 
This is where I'm stumped, the log files don't show any relevant info or
messages to point me to anything thats wrong.
 
I'm running it on debian sarge distro using the .deb package from
sourceforge.
 
 
Ger.
 
 
From: Hubbard, Greg L [mailto:user-d970b5e56ec9@xymon.invalid] 
Sent: 30 November 2006 19:55
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Why bother when Hobbit will use your echo output to do that?
 
But there is more to graphing than simply creating the RRD files.  Next you
have to create graph definitions that will use your new files, and these
graphs have to work.  Then you can add your new graphs to the Hobbit server
so they will show up with the associated test (TEST2RRD variable) and/or in
the trends display.
 
You say you see the data being echoed -- are the RRD files not getting
created/updated?  Did you add your rrd-ext to the right place on the server?
Did you add it to hobbit-rrd for both data and status messages?
 
(or whatever, I am going from dim memory)
 
GLH


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: Thursday, November 30, 2006 1:44 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Guys, When creating custom scripts, has anyone just used rrdcreate and
rrdtool update to directly output the data to the rrd files ?
 
If the the tests are all residing on the one machine and not polling data
from other clients is it an easier way to update the graphs as I just can't
get the status script to update for me ?
 
Thanks,
Ger.


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: 29 November 2006 20:13
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Custom RRD graphs


Hi folks,
 
I have created a custom script for capturing CPU utilisation from a device
and updated all the relevant files but I cannot get my rrd files to update
correctly.
 
An initial rrd file gets created but the data does not get input into it.
 
I have created a rrd-ext sript which is running and is capturing the
incomming status data and by looking at the /tmp files I can see that the
echo outputs are being generated correctly every 5 mintes.
 
----> rrd-ext.sh
 
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
 
if [ "$TESTNAME" = "acpu" ]
then
        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        # Analyze the message we got
        # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"." -f1`
        # The RRD dataset definitions
        echo "DS:acpu:GAUGE:600:0:100"
        # The filename
        echo "acpu.rrd"
        # The data
        echo "$ACPU"
        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
fi
 
 
The value I want to graph is simply a cpu % counter, have I got the above
values and setting correct for this ?
 
Any help or pointers appreciated.
 
 
Output that this produces is below showing that it is getting the data
correctly from the status input.
 
---> /tmp/hobbit.$HOSTNAME.$TESTNAME
 
Wed Nov 29 19:54:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_13879
14
Wed Nov 29 19:59:05 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_26569
25
Wed Nov 29 20:04:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_2788
17
Wed Nov 29 20:09:12 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_11944
9

 
Ger.
list Ger Maguire · Sun, 3 Dec 2006 12:33:02 -0000 ·
Folks,
 
I'm still having trouble with my graphs. I have turned on the debug mode and
I'm getting the following for one of the tests.
I've even gone so far to do a complete OS install on a new machine with only
hobbit to make there was nothing conflicting with it.
 
The scripts seem to be working but the rrd files are just not updating. Can
anyone see anything wrong ?
 
2006-12-03 12:27:42 Want msg 119403, startpos 128142, fillpos 128142, endpos
-1, usedbytes=0, bufleft=400241
2006-12-03 12:27:42 hobbitd_rrd: Got message 119403
@@status#119403|1165148862.825676|10.8.1.10||fwi-lor-02|acpu|1165150662|gree
n||green|1165065289|0||0||0

2006-12-03 12:27:42 startpos 128677, fillpos 128677, endpos -1
2006-12-03 12:27:42 -> do_external(fwi-lor-02, acpu)
2006-12-03 12:27:42 <- do_external(fwi-lor-02, acpu)
2006-12-03 12:27:42 Want msg 119404, startpos 128677, fillpos 128677, endpos
-1, usedbytes=0, bufleft=399706
2006-12-03 12:27:42 000013787 : Saving msg to file
/usr/lib/hobbit/server/tmp/rrd_msg_13787
2006-12-03 12:27:42 000013787 : Calling helper script
/usr/lib/hobbit/server/ext/rrd-ext.sh fwi-lor-02 acpu
/usr/lib/hobbit/server/tmp/rrd_msg_13787

2006-12-03 12:27:42 000013787 : Unlinking temp file
quoted from Ger Maguire

 
Thanks,
Ger.


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: 30 November 2006 20:17
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


I think I have gone through all the steps and have poured over the docs and
manpages
 
So far:
 
1 Created custom script outputing data to hobbit using status switch
 
$BBHOME/bin/bb $BBDISP "status $HOST.$TEST $COLOUR $OUTPUT"

 
2 Created rrd-ext script and have it getting data as per below (numeric vale
for catching a % value)
 
 
3 Modified hobbitserver.cfg
 
Added acpu test to TEST2RRD="cpu=la,disk, ... ,acpu"
 
Added acpu test to GRAPHS="la,disk, ... ,acpu"
 
 
4 Modified hobbitlaunch.cfg

[rrdstatus]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD hobbitd_channel --channel=status
--log=$BBSERVERLOGS/rrd-status.log
        hobbitd_rrd --rrddir=$BBVAR/rrd
--extra-script=/usr/lib/hobbit/server/ext/rrd-ext.sh --extra-tests=acpu

 
I haven't modified [rrddata] as I'm sending the data in using the status
command but I'll stick it in and see if it makes a difference.

Added the test itself to hobbitlaunch to run every 5 mins, all works ok
pages update in hobbit
 
[acpu]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD $BBHOME/ext/acpu.sh
        INTERVAL 5m

 
5 Modified hobbitgraph.cfg with the following
 
[acpu]
        TITLE CPU Utilisation
        YAXIS % Load
        DEF:acpu=acpu.rrd:acpu:AVERAGE
        AREA:acpu#00CC00:Utilisation
        GPRINT:acpu:LAST: \: %5.1lf%s (cur)
        GPRINT:acpu:MAX: \: %5.1lf%s (max)
        GPRINT:acpu:MIN: \: %5.1lf%s (min)
        GPRINT:acpu:AVERAGE: \: %5.1lf%s (avg)\n
 
 
The rrd files get created in the correct place and the pages in hobbit show
the graph but there is just no data being displayed and the timestamp on the
acpu.rrd files is showing they are not being updated.
 
This is where I'm stumped, the log files don't show any relevant info or
messages to point me to anything thats wrong.
 
I'm running it on debian sarge distro using the .deb package from
sourceforge.
 
 
Ger.
 
 
From: Hubbard, Greg L [mailto:user-d970b5e56ec9@xymon.invalid] 
Sent: 30 November 2006 19:55
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Why bother when Hobbit will use your echo output to do that?
 
But there is more to graphing than simply creating the RRD files.  Next you
have to create graph definitions that will use your new files, and these
graphs have to work.  Then you can add your new graphs to the Hobbit server
so they will show up with the associated test (TEST2RRD variable) and/or in
the trends display.
 
You say you see the data being echoed -- are the RRD files not getting
created/updated?  Did you add your rrd-ext to the right place on the server?
Did you add it to hobbit-rrd for both data and status messages?
 
(or whatever, I am going from dim memory)
 
GLH


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: Thursday, November 30, 2006 1:44 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Custom RRD graphs


Guys, When creating custom scripts, has anyone just used rrdcreate and
rrdtool update to directly output the data to the rrd files ?
 
If the the tests are all residing on the one machine and not polling data
from other clients is it an easier way to update the graphs as I just can't
get the status script to update for me ?
 
Thanks,
Ger.


From: Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid] 
Sent: 29 November 2006 20:13
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Custom RRD graphs


Hi folks,
 
I have created a custom script for capturing CPU utilisation from a device
and updated all the relevant files but I cannot get my rrd files to update
correctly.
 
An initial rrd file gets created but the data does not get input into it.
 
I have created a rrd-ext sript which is running and is capturing the
incomming status data and by looking at the /tmp files I can see that the
echo outputs are being generated correctly every 5 mintes.
 
----> rrd-ext.sh
 
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"
 
if [ "$TESTNAME" = "acpu" ]
then
        echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
        # Analyze the message we got
        # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
        ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"." -f1`
        # The RRD dataset definitions
        echo "DS:acpu:GAUGE:600:0:100"
        # The filename
        echo "acpu.rrd"
        # The data
        echo "$ACPU"
        echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
fi
 
 
The value I want to graph is simply a cpu % counter, have I got the above
values and setting correct for this ?
 
Any help or pointers appreciated.
 
 
Output that this produces is below showing that it is getting the data
correctly from the status input.
 
---> /tmp/hobbit.$HOSTNAME.$TESTNAME
 
Wed Nov 29 19:54:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_13879
14
Wed Nov 29 19:59:05 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_26569
25
Wed Nov 29 20:04:07 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_2788
17
Wed Nov 29 20:09:12 GMT 2006
/usr/lib/hobbit/server/tmp/rrd_msg_11944
9

 
Ger.
list Ger Maguire · Sun, 3 Dec 2006 12:35:59 -0000 ·
For those who haven't seen bbmap has been patched for hobbit, good to have
the map status back again.
 
http://bbmap.free.fr/ 
 
Thanks to Daniel McDonald.
 
Ger.
list Thomas Pedersen · Sun, 03 Dec 2006 19:52:54 +0100 ·
Hi

I dont know why you would write your own rrdext script when NCV will do this for you. Looking at your steps all you need is to send the OUTPUT in a seperate line with a blank line in between and then adding a NCV_acpu="acpu:GAUGE" to hobbitserver.cfg and all will be done for you.

This is where I always go when ever I have a new graph to make http://www.hswn.dk/~henrik/howtograph.txt

Br Thomas
quoted from Ger Maguire

Ger Maguire wrote:
Folks,
 I'm still having trouble with my graphs. I have turned on the debug mode and I'm getting the following for one of the tests.
I've even gone so far to do a complete OS install on a new machine with only hobbit to make there was nothing conflicting with it.
 The scripts seem to be working but the rrd files are just not updating. Can anyone see anything wrong ?
 2006-12-03 12:27:42 Want msg 119403, startpos 128142, fillpos 128142, endpos -1, usedbytes=0, bufleft=400241

2006-12-03 12:27:42 hobbitd_rrd: Got message 119403 @@status#119403|1165148862.825676|10.8.1.10||fwi-lor-02|acpu|1165150662|green||green|1165065289|0||0||0
quoted from Ger Maguire
2006-12-03 12:27:42 startpos 128677, fillpos 128677, endpos -1
2006-12-03 12:27:42 -> do_external(fwi-lor-02, acpu)
2006-12-03 12:27:42 <- do_external(fwi-lor-02, acpu)
2006-12-03 12:27:42 Want msg 119404, startpos 128677, fillpos 128677, endpos -1, usedbytes=0, bufleft=399706
2006-12-03 12:27:42 000013787 : Saving msg to file /usr/lib/hobbit/server/tmp/rrd_msg_13787
2006-12-03 12:27:42 000013787 : Calling helper script /usr/lib/hobbit/server/ext/rrd-ext.sh fwi-lor-02 acpu /usr/lib/hobbit/server/tmp/rrd_msg_13787
2006-12-03 12:27:42 000013787 : Unlinking temp file
 Thanks,
Ger.

*From:* Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid]
*Sent:* 30 November 2006 20:17
*To:* user-ae9b8668bcde@xymon.invalid
*Subject:* RE: [hobbit] Custom RRD graphs

I think I have gone through all the steps and have poured over the docs and manpages
 So far:
 1 Created custom script outputing data to hobbit using status switch
 $BBHOME/bin/bb $BBDISP "status $HOST.$TEST $COLOUR $OUTPUT"
 2 Created rrd-ext script and have it getting data as per below (numeric vale for catching a % value)
  3 Modified hobbitserver.cfg
 Added acpu test to TEST2RRD="cpu=la,disk, ... ,acpu"
 Added acpu test to GRAPHS="la,disk, ... ,acpu"
  4 Modified hobbitlaunch.cfg

[rrdstatus]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD hobbitd_channel --channel=status --log=$BBSERVERLOGS/rrd-status.log
        hobbitd_rrd --rrddir=$BBVAR/rrd --extra-script=/usr/lib/hobbit/server/ext/rrd-ext.sh --extra-tests=acpu
 I haven't modified [rrddata] as I'm sending the data in using the status command but I'll stick it in and see if it makes a difference.
Added the test itself to hobbitlaunch to run every 5 mins, all works ok pages update in hobbit
 [acpu]
        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD $BBHOME/ext/acpu.sh
        INTERVAL 5m
 5 Modified hobbitgraph.cfg with the following
 [acpu]
        TITLE CPU Utilisation
        YAXIS % Load
        DEF:acpu=acpu.rrd:acpu:AVERAGE
        AREA:acpu#00CC00:Utilisation
        GPRINT:acpu:LAST: \: %5.1lf%s (cur)
        GPRINT:acpu:MAX: \: %5.1lf%s (max)
        GPRINT:acpu:MIN: \: %5.1lf%s (min)
        GPRINT:acpu:AVERAGE: \: %5.1lf%s (avg)\n
  The rrd files get created in the correct place and the pages in hobbit show the graph but there is just no data being displayed and the timestamp on the acpu.rrd files is showing they are not being updated.
 This is where I'm stumped, the log files don't show any relevant info or messages to point me to anything thats wrong.
 I'm running it on debian sarge distro using the .deb package from sourceforge.
  Ger.
*From:* Hubbard, Greg L [mailto:user-d970b5e56ec9@xymon.invalid]
*Sent:* 30 November 2006 19:55
*To:* user-ae9b8668bcde@xymon.invalid
*Subject:* RE: [hobbit] Custom RRD graphs

Why bother when Hobbit will use your echo output to do that?
 But there is more to graphing than simply creating the RRD files.  Next you have to create graph definitions that will use your new files, and these graphs have to work.  Then you can add your new graphs to the Hobbit server so they will show up with the associated test (TEST2RRD variable) and/or in the trends display.
 You say you see the data being echoed -- are the RRD files not getting created/updated?  Did you add your rrd-ext to the right place on the server?  Did you add it to hobbit-rrd for both data and status messages?
 (or whatever, I am going from dim memory)
 GLH

    *From:* Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid]
    *Sent:* Thursday, November 30, 2006 1:44 PM
    *To:* user-ae9b8668bcde@xymon.invalid
    *Subject:* RE: [hobbit] Custom RRD graphs

    Guys, When creating custom scripts, has anyone just used rrdcreate
    and rrdtool update to directly output the data to the rrd files ?
         If the the tests are all residing on the one machine and not
    polling data from other clients is it an easier way to update the
    graphs as I just can't get the status script to update for me ?
         Thanks,
    Ger.

    *From:* Ger Maguire [mailto:user-1e703f47b22b@xymon.invalid]
    *Sent:* 29 November 2006 20:13
    *To:* user-ae9b8668bcde@xymon.invalid
    *Subject:* [hobbit] Custom RRD graphs

    Hi folks,
         I have created a custom script for capturing CPU utilisation from
    a device and updated all the relevant files but I cannot get my
    rrd files to update correctly.
         An initial rrd file gets created but the data does not get input
    into it.
         I have created a rrd-ext sript which is running and is capturing
    the incomming status data and by looking at the /tmp files I can
    see that the echo outputs are being generated correctly every 5
    mintes.
         ----> rrd-ext.sh
         HOSTNAME="$1"
    TESTNAME="$2"
    FNAME="$3"
         if [ "$TESTNAME" = "acpu" ]
    then
            echo "`date`" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
            echo "$FNAME" >> /tmp/hobbit.$HOSTNAME.$TESTNAME
            # Analyze the message we got
            # ACPU=`grep "connected" $FNAME | awk '{print $14}'`
            ACPU=`grep "The 5" $FNAME | cut -d"(" -f2 | cut -d"." -f1`
            # The RRD dataset definitions
            echo "DS:acpu:GAUGE:600:0:100"
            # The filename
            echo "acpu.rrd"
            # The data
            echo "$ACPU"
            echo "$ACPU"  >> /tmp/hobbit.$HOSTNAME.$TESTNAME
    fi
              The value I want to graph is simply a cpu % counter, have I got
    the above values and setting correct for this ?
         Any help or pointers appreciated.
              Output that this produces is below showing that it is getting the
    data correctly from the status input.
         ---> /tmp/hobbit.$HOSTNAME.$TESTNAME
         Wed Nov 29 19:54:07 GMT 2006
    /usr/lib/hobbit/server/tmp/rrd_msg_13879
    14
    Wed Nov 29 19:59:05 GMT 2006
    /usr/lib/hobbit/server/tmp/rrd_msg_26569
    25
    Wed Nov 29 20:04:07 GMT 2006
    /usr/lib/hobbit/server/tmp/rrd_msg_2788
    17
    Wed Nov 29 20:09:12 GMT 2006
    /usr/lib/hobbit/server/tmp/rrd_msg_11944
    9
              Ger.