Xymon Mailing List Archive search

Custom RRDs

5 messages in this thread

list David Stuffle · Fri, 6 May 2005 10:35:47 -0500 ·
I have created a custom RRD script and it been working fine.  Any host that
sends a "license" column status with a line containing "In Use: x" will get
the license usage (x) graphed.  But, for some reason it won't work on a host
I have that has a hostname of "license".  RRD file gets created, but it's
all "nan" values.  Could having the exact same hostname, Dataset name, and
column name cause it not to work?  The only other difference in this host is
it's a Windows machine instead of Unix, but the status sent to Hobbit is the
same so I can't see that it would matter.  Thanks!

~~~~~~~~~~~~~~
David Stuffle     
Delta Faucet Company


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 Andy France · Sat, 7 May 2005 08:59:40 +1200 ·

It sounds to me like you are picking up the status line rather than the
data line.

Check your RRD script again... if you are grepping/awking for a line
containing license you may need to narrow your criteria :-)

It may be as simple as adding "tail -1" to make sure you only get the last
occurence.

HTH,
Andy.


"Stuffle, David" wrote on 07/05/2005 03:35:47:
quoted from David Stuffle
I have created a custom RRD script and it been working fine.  Any host
that
sends a "license" column status with a line containing "In Use: x" will
get
the license usage (x) graphed.  But, for some reason it won't work on a
host
I have that has a hostname of "license".  RRD file gets created, but it's
all "nan" values.  Could having the exact same hostname, Dataset name,
and
column name cause it not to work?  The only other difference in this host
is
it's a Windows machine instead of Unix, but the status sent to Hobbit is
the
same so I can't see that it would matter.  Thanks!
~~~~~~~~~~~~~~
David Stuffle
Delta Faucet Company

#####################################################################################

This email is intended for the person to whom it is addressed
only. If you are not the intended recipient, do not read, copy
or use the contents in any way. The opinions expressed may not
necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').

While every effort has been made to verify the information
contained herein, ZESPRI does not make any representations 
as to the accuracy of the information or to the performance
of any data, information or the products mentioned herein.
ZESPRI will not accept liability for any losses, damage or
consequence, however, resulting directly or indirectly from
the use of this e-mail/attachments.
#####################################################################################
list David Stuffle · Mon, 9 May 2005 09:15:48 -0500 ·
quoted from Andy France
"Stuffle, David" wrote on 07/05/2005 03:35:47:
I have created a custom RRD script and it been working
fine.  Any host
that
sends a "license" column status with a line containing
"In Use: x" will
get
the license usage (x) graphed.  But, for some reason it
won't work on a
host
I have that has a hostname of "license".  RRD file gets
created, but it's all "nan" values.  Could having the
exact same hostname, Dataset name,
and
column name cause it not to work?  The only other
difference in this host
is
it's a Windows machine instead of Unix, but the status
sent to Hobbit is
the
same so I can't see that it would matter.  Thanks!
~~~~~~~~~~~~~~
David Stuffle
Delta Faucet Company
Andy France wrote:
It sounds to me like you are picking up the status line
rather than the data line.

Check your RRD script again... if you are grepping/awking
for 
a line containing license you may need to narrow your
criteria :-) 

It may be as simple as adding "tail -1" to make sure you
only 
get the last occurence.

HTH,
Andy.

I have verified I am getting the right data from the status by redirecting
the script to a file.  Somewhere between grepping the license count and
putting it in the RRD file it gets lost.  I'm figuring it must be because
the hostname is the same as the DS name.  Any other host I plug in to it
works fine.  Thanks 


~~~~~~~~~~~~~~
David Stuffle                       user-4d88f4a4f51e@xymon.invalid
Delta Faucet Company                (XXX) XXX-XXXX
quoted from 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 Andy France · Tue, 10 May 2005 09:30:31 +1200 ·

"Stuffle, David" wrote on 10/05/2005 02:15:48:
quoted from David Stuffle
"Stuffle, David" wrote on 07/05/2005 03:35:47:
I have created a custom RRD script and it been working
fine.  Any host
that
sends a "license" column status with a line containing
"In Use: x" will
get
the license usage (x) graphed.  But, for some reason it
won't work on a
host
I have that has a hostname of "license".  RRD file gets
created, but it's all "nan" values.  Could having the
exact same hostname, Dataset name,
and
column name cause it not to work?  The only other
difference in this host
is
it's a Windows machine instead of Unix, but the status
sent to Hobbit is
the
same so I can't see that it would matter.  Thanks!
~~~~~~~~~~~~~~
David Stuffle
Delta Faucet Company
Andy France wrote:
It sounds to me like you are picking up the status line
rather than the data line.

Check your RRD script again... if you are grepping/awking
for
a line containing license you may need to narrow your
criteria :-)

It may be as simple as adding "tail -1" to make sure you
only
get the last occurence.

HTH,
Andy.

I have verified I am getting the right data from the status by
redirecting
the script to a file.  Somewhere between grepping the license count and
putting it in the RRD file it gets lost.  I'm figuring it must be because
the hostname is the same as the DS name.  Any other host I plug in to it
works fine.  Thanks
If you post the script and message content either here or directly to me,
I'd be happy to take a look :-)

Andy.
quoted from Andy France

#####################################################################################

This email is intended for the person to whom it is addressed
only. If you are not the intended recipient, do not read, copy
or use the contents in any way. The opinions expressed may not
necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').

While every effort has been made to verify the information
contained herein, ZESPRI does not make any representations 
as to the accuracy of the information or to the performance
of any data, information or the products mentioned herein.
ZESPRI will not accept liability for any losses, damage or
consequence, however, resulting directly or indirectly from
the use of this e-mail/attachments.
#####################################################################################
list David Stuffle · Tue, 10 May 2005 07:55:38 -0500 ·
quoted from Andy France
Andy France wrote:
"Stuffle, David" wrote on 10/05/2005 02:15:48:
"Stuffle, David" wrote on 07/05/2005 03:35:47:
I have created a custom RRD script and it been working
fine.  Any host
that
sends a "license" column status with a line containing
"In Use: x" will
get
the license usage (x) graphed.  But, for some reason
it won't work on a
host
I have that has a hostname of "license".  RRD file
gets created, but it's all "nan" values.  Could having
the exact same hostname, Dataset name,
and
column name cause it not to work?  The only other
difference in this host
is
it's a Windows machine instead of Unix, but the status
sent to Hobbit is
the
same so I can't see that it would matter.  Thanks!
~~~~~~~~~~~~~~
David Stuffle
Delta Faucet Company
Andy France wrote:
It sounds to me like you are picking up the status line
rather than the data line. 

Check your RRD script again... if you are
grepping/awking for a line containing license you may
need to narrow your criteria :-) 

It may be as simple as adding "tail -1" to make sure
you only get the last occurence. 

HTH,
Andy.

I have verified I am getting the right data from the
status by redirecting the script to a file.  Somewhere
between grepping the license count and putting it in the
RRD file it gets lost.  I'm figuring it must be because
the hostname is the same as the DS name.  Any other host
I plug in to it works fine.  Thanks 
If you post the script and message content either here or
directly to me, I'd be happy to take a look :-)
Thanks!  Here is the script: (if the format gets messed up, I also attached
a file with the same contents)
#!/bin/sh

# Input parameters: Hostname, testname (column), and messagefile
HOSTNAME="$1"
TESTNAME="$2"
FNAME="$3"

if [ "$TESTNAME" = "license" ]
then
        # Analyze the message we got
        InUse=`grep "In Use" $FNAME | cut -d : -f 2 | sed "s/ //"`
        
        # The RRD dataset definitions
        echo "DS:license:GAUGE:600:0:U"
   
        # The filename
        echo "license.rrd"

        # The data
        echo "$InUse"

        # Added for debugging purposes
        if [ "$HOSTNAME" = "license" ]
        then
                echo $HOSTNAME, $TESTNAME, $FNAME >>license_test.txt
                echo "$InUse" >>license_test.txt
                cat $FNAME >>license_test.txt
        fi
fi


The output from the debugging part (license_test.txt) looks like this:
license, license, /usr/local/hobbit/server/tmp/rrd_msg_27159
8 
status license.license green Tue 05/10/2005- 7:37:41.18 
Pro/Engineer Wildfire 2 Licenses 
Total licenses available: 31 
                  In Use: 8 


And here's the RRD definition:
[license]
        TITLE License Utilization
        YAXIS Used Licenses
        DEF:avg=license.rrd:license:AVERAGE
        LINE2:avg#@COLOR@:Used Licenses
        GPRINT:avg:LAST: \: %5.0lf (cur)
        GPRINT:avg:MAX: \: %5.0lf (max)
        GPRINT:avg:MIN: \: %5.0lf (min)
        GPRINT:avg:AVERAGE: \: %5.0lf (avg)\n


Two other hosts are sending license statuses and they're graphing fine.
Just this "license" hostname is not.  The graph shows up and the rrd file is
getting updated, but with no values.

Thanks again!!
quoted from David Stuffle

~~~~~~~~~~~~~~
David Stuffle                       user-4d88f4a4f51e@xymon.invalid
Delta Faucet Company                (XXX) XXX-XXXX


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.
Attachments (1)