rrdcreate: support scale suffix for heartbeat/steps/rows #468
This feature allows this opaque create specification:
to be expressed with more understandable durations:
This feature allows this opaque create specification: rrdtool create power1.rrd \ --start 0 --step 1 \ DS:watts:GAUGE:300:0:24000 \ RRA:AVERAGE:0.5:1:864000 \ RRA:AVERAGE:0.5:60:129600 \ RRA:AVERAGE:0.5:3600:13392 \ RRA:AVERAGE:0.5:86400:3660 to be expressed with more understandable durations: rrdtool create power2.rrd \ --start 0 --step 1s \ DS:watts:GAUGE:5m:0:24000 \ RRA:AVERAGE:0.5:1s:10d \ RRA:AVERAGE:0.5:1m:90d \ RRA:AVERAGE:0.5:1h:18M \ RRA:AVERAGE:0.5:1d:10y Signed-off-by: Peter A. Bigot <firstname.lastname@example.org>
- Fix missed diagnostic for negative values accepted by strtoul. - Add detailed diagnostics for parsing failures. - Add diagnostic when duration-based RRA steps (rows) are not multiples of PDP interval (RRA span). - Fix row count when PDP interval not one second. - Extend documentation to special-function RRA example.
I've added a patch that I think does what you want and agree it's an improvement. Now this:
Diagnostics for other invalid values are also enhanced:
The patch also fixes a few other issues and applies the new feature to the HWPREDICT example.
Let me know if you have other concerns you'd like addressed. I had been writing really ugly shell scripts to do the math for me, but seeing how cleanly it was done in carbon's storage-schemas.conf inspired me to add direct support in rrdcreate instead.