[rrd-users] Re: VRULE with dynamic time
Patrick Rother
krd-rrd-users at roka.net
Wed Jun 6 15:30:52 MEST 2001
On Wed, Jun 06, 2001 at 02:32:56PM +0200, Alex van den Bogaerdt wrote:
> krd-rrd-users at roka.net wrote:
> > I would like to get an rrd graph over 60 hours, with a VRULE at one day ago.
> >
> > I tried the following, but this doesn't seem to be supported.
> > ([ERROR: can't parse 't2#FF0000:'])
> >
> > What can I do?
> >
> > CDEF:t=NOW
> > CDEF:t2=t,86400,-
> > VRULE:t2#FF0000:
>
> This won't work. You have to calculate "now" and "now-1d" in the
> front end. The results can be given to RRDtool.
>
> CDEF:t=NOW doesn't work (AFAIK)
> CDEF:t2=t,86400 won't work because of the previous error
> VRULE:t2#FF0000 won't work because t2 should be a number, not a var
>
> (this last thing is expected to change in the future).
>
> For now: in your script calculate t and t2. Then give "CDEF:${t2}#FF0000:"
> to RRDtool (where "${t2}" is parsed by your OS, not by RRDtool)
Thank you for this, it seems to work well.
t=`date -d "one day ago" +%s`
VRULE:${t}#FF0000:
Thank you!
krd.
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list