[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rrd-users
Subject:    Re: [rrd-users] Help -how to extract rrd data for script variables
From:       Alex van den Bogaerdt <alex () ergens ! op ! het ! net>
Date:       2007-09-09 12:25:44
Message-ID: 20070909122544.GA30772 () ergens ! op ! het ! net
[Download RAW message or body]

On Sun, Sep 09, 2007 at 09:37:16PM +1000, Rob Conway wrote:
> I was hoping someone could help me out in a script snippet (hopefully bash) in how \
> to extract data from an rrd to be used within script variables. 
> example... I would like to get four variables that represented say max daily, min \
> daily, avg daily and last value.  I do not want to plot a graph  just use the rrd \
> database to extract the four pieces of information and place them in my script  \
> variable so I can biuld a simple report  I already have the rrd's setup for max, \
> min avg


To help you get started (you will need to work this further out, correct it):

prepare a graph command:

rrdtool graph whatever DEF:... CDEF:... and so on.
Then:   PRINT:myvar:shellvar1=%lf  PRINT:myothervar:shellvar2=%lf
 and so on

Then in bash:

eval $(rrdtool graph whatever DEF:.... and so on)

or

eval $(/path/to/graph/script)


HTH
-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic