RRDTool

From vwiki
Revision as of 23:32, 19 January 2010 by Sstrutt (talk | contribs) (Initial creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

http://oss.oetiker.ch/rrdtool/index.en.html - RRDTool homepage

Getting Started

Create a Database

The following example creates a RRD database to hold an ESX's aggregated (average of all cores) CPU data with;

  • Raw data held for 12 hrs (realtime)
  • 5 min average (with max and min values) for 24 hrs (daily)
  • 20 min average (with max and min values) for 7 days (weekly)
  • 60 min average (with max and min values) for 31 days (monthly)
  • 1 day average (with max and min values) for 365 days (yearly)

In order to achieve the rolled-up averages, its necessary to calculate;

  • The number of raw data points required for that average (eg to be able to calculate a 5 min average)
  • The number of those averages to store (eg to be able to have a day's worth of 5 min average data)

Its also necessary to calculate how much raw data you want to store (if any)

  • Raw
    • Data is available every 20 secs
    • Therefore 3 intervals per min
    • Therefore 3 x 60 = 180 raw data points per hour
    • Therefore 12 x 180 = 2160 raw data points (to provide 12 hrs of data)
  • Daily

15 intervals = 5min (period to average over) 1440 av points = 24 hr coverage

60 intervals = 20 mins 504 av points = 7 days coverage

180 intervals = 1 hr 744 av points = 31 days coverage

4320 intervals = 1 day 366 av point = 1 yr coverage


rrdtool create esx1-cpu.rrd --step 20 \ DS:CPU-Aggregate:GAUGE:40:0:100 \ RRA:AVERAGE:0.5:1:2160 \ RRA:AVERAGE:0.25:15:1440 \ RRA:MIN:0.25:15:1440 \ RRA:MAX:0.25:15:1440 \ RRA:AVERAGE:0.25:60:504 \ RRA:MIN:0.25:60:504 \ RRA:MAX:0.25:60:504 \ RRA:AVERAGE:0.25:180:744 \ RRA:MIN:0.25:180:744 \ RRA:MAX:0.25:180:744 \ RRA:AVERAGE:0.25:4320:366 \ RRA:MIN:0.25:4320:366 \ RRA:MAX:0.25:4320:366