[rrd-users] Using Granular RRA Automatically
Stephen R Guglielmo
srguglielmo at gmail.com
Mon Jan 23 23:15:51 CET 2017
Hello,
I'm new to rrdtool. I'm trying to create a database that will record
and graph data from an application. I have been using the rrdtool
documentation and the RRD Wizard website to assist me. I'd like to
keep track of "total sites," "deleted sites," "outdated sites, and
"total users" (users will be a separate graph).
rrdtool create filename.rrd \
--step '86400' \
'DS:TotalSites:GAUGE:172800:0:U' \
'DS:DeletedSites:GAUGE:172800:0:U' \
'DS:OutdatedSites:GAUGE:172800:0:U' \
'DS:TotalUsers:GAUGE:172800:0:U' \
'RRA:MIN:0.3:7:520' \
'RRA:MAX:0.3:7:520' \
'RRA:AVERAGE:0.3:7:520' \
'RRA:LAST:0.3:7:520' \
'RRA:MIN:0.3:1:35' \
'RRA:MAX:0.3:1:35' \
'RRA:AVERAGE:0.3:1:35' \
'RRA:LAST:0.3:1:35'
With the above database, I update it once a day with four data points.
I record MIN, MAX, AVERAGE, and LAST on a weekly basis for 10 years. I
also record MIN, MAX, AVERAGE, and LAST on a daily basis for 35 days.
My question is: Since the RRAs are not named, if I create 1 month, 1
year, and 2 year graphs, will the 1 month graph automatically use the
more granular RRAs (the "daily" 35-day ones as opposed to the "weekly"
10-year ones)?
Here is an example `graph` command that I received from the RRD Wizard:
rrdtool graph 'sites-1month.png' \
--title 'Sites, 1 Month' \
--vertical-label 'Number of Sites' \
--width '800' \
--height '300' \
--full-size-mode \
--start end-1m \
'DEF:SitesMin=sites-new.rrd:TotalSites:MIN' \
'DEF:SitesMax=sites-new.rrd:TotalSites:MAX' \
'DEF:SitesAvg=sites-new.rrd:TotalSites:AVERAGE' \
'DEF:SitesLast=sites-new.rrd:TotalSites:LAST' \
'DEF:DeletedMin=sites-new.rrd:DeletedSites:MIN' \
'DEF:DeletedMax=sites-new.rrd:DeletedSites:MAX' \
'DEF:DeletedAvg=sites-new.rrd:DeletedSites:AVERAGE' \
'DEF:DeletedLast=sites-new.rrd:DeletedSites:LAST' \
'DEF:OutdatedMin=sites-new.rrd:OutdatedSites:MIN' \
'DEF:OutdatedMax=sites-new.rrd:OutdatedSites:MAX' \
'DEF:OutdatedAvg=sites-new.rrd:OutdatedSites:AVERAGE' \
'DEF:OutdatedLast=sites-new.rrd:OutdatedSites:LAST' \
'VDEF:SitesMinMin=SitesMin,MINIMUM' \
'VDEF:SitesMaxMax=SitesMax,MAXIMUM' \
'VDEF:SitesAvgAvg=SitesAvg,AVERAGE' \
'VDEF:DeletedMinMin=DeletedMin,MINIMUM' \
'VDEF:DeletedMaxMax=DeletedMax,MAXIMUM' \
'VDEF:OudatedMinMin=OutdatedMin,MINIMUM' \
'VDEF:OutdatedMaxMax=OutdatedMax,MAXIMUM' \
'VDEF:OutdatedAvgAvg=OutdatedAvg,AVERAGE' \
'VDEF:DeletedAvgAvg=DeletedAvg,AVERAGE' \
'LINE1:SitesLast#00FF00:Total Sites' \
'LINE1:DeletedLast#FF0000:Deleted Sites' \
'LINE1:OutdatedLast#FFFF00:Outdated Sites (>=2 Years)' \
'PRINT:SitesMinMin:%.1lf Sites Min' \
'PRINT:SitesMaxMax:%.1lf Sites Max' \
'PRINT:SitesAvgAvg:%.1lf Sites Avg' \
'PRINT:DeletedMinMin:%.1lf Deleted Min' \
'PRINT:DeletedMaxMax:%.1lf Deleted Max' \
'PRINT:DeletedAvgAvg:%.1lf Deleted Avg' \
'PRINT:OudatedMinMin:%.1lf Outdated Min' \
'PRINT:OutdatedMaxMax:%.1lf Outdated Max' \
'PRINT:OutdatedAvgAvg:%.1lf Outdated Avg'
Thank you!
Steve
More information about the rrd-users
mailing list