RRDTOOL and defining a value outside of the database file.

Soldato
Joined
8 Mar 2005
Posts
3,674
Location
London, UK
Anyone have any experience with RRDTOOL?

I'm trying to include a defined value as a persistent data-point when graphing. So, as well as graphing from the database file; I also want to include a line plot which is basically value x and provides a straight line indicator in the graph itself.

Code:
rrdtool.exe graph output.png -w 1000 -h 300 --end now+10d --start now-30d --slope-mode ^
--vertical-label "Licenses Checked Out" --title "Forecast" ^
DEF:Total=database.rrd:total:AVERAGE ^
DEF:Used=database.rrd:used:AVERAGE ^
DEF:Avail=database.rrd:avail:AVERAGE ^
DEF:Overdraft=database.rrd:overdraft:AVERAGE ^
CDEF:LineUsed=Used,1,* ^
CDEF:LineAvail=Avail,1,* ^
CDEF:LineTotal=Total,1,* ^
CDEF:LineOverdraft=Total,Overdraft,- ^
VDEF:slope=LineUsed,LSLSLOPE ^
VDEF:cons=LineUsed,LSLINT ^
CDEF:leastsquareline=LineUsed,POP,slope,COUNT,*,cons,+ ^
COMMENT:" " COMMENT:"Last    " COMMENT:"AVERAGEimum " COMMENT:"AVERAGE " COMMENT:"Minimum\l" ^
AREA:LineUsed#fe3562:"Used ":STACK PRINT:Used:LAST:"%%6.3lf %%S" PRINT:Used:AVERAGE:"%%6.3lf %%S" PRINT:Used:AVERAGE:"%%6.3lf %%S" PRINT:Used:MIN:"%%6.3lf %%S\l" ^
AREA:LineAvail#cfe694:"Available ":STACK PRINT:Avail:LAST:"%%6.3lf %%S" PRINT:Avail:AVERAGE:"%%6.3lf %%S" PRINT:Avail:AVERAGE:"%%6.3lf %%S" PRINT:Avail:MIN:"%%6.3lf %%S\l" ^
LINE2:LineTotal#3b73fc:"Total " PRINT:Total:LAST:"%%6.3lf %%S" PRINT:Total:AVERAGE:"%%6.3lf %%S" PRINT:Total:AVERAGE:"%%6.3lf %%S" PRINT:Total:MIN:"%%6.3lf %%S\l" ^
LINE1:LineOverdraft#9e0b0f:"Overdraft " PRINT:Overdraft:LAST:"%%6.3lf %%S" PRINT:Overdraft:AVERAGE:"%%6.3lf %%S" PRINT:Overdraft:AVERAGE:"%%6.3lf %%S" PRINT:Overdraft:MIN:"%%6.3lf %%S\l" ^
LINE1:leastsquareline#FF9900:"Trend"
Does that make sense? I cannot see anything in the documentation which would allow for that except CDEF, but that states it needs to reference other data-points in the database.

Hmm ta, Paul.
 
Back
Top Bottom