Creating graphs with RRDtool
As you have seen in the preface, Cacti uses RRDtool to store the polled data. In addition to just storing the data, RRDtool is also used to create the actual performance graphs.
If you now expect to see a full-featured charting application, you will be disappointed. RRDtool graph functionality only offers a very limited range of chart types. They can either be line charts, area charts, or a combination of both. There is no 3D option available or any other type of chart, such as pie or scatter charts. This may be a disadvantage for some at first, but concentrating on only a few basic chart types makes it a fast, specialized rendering engine for these types. This is the main focus of the RRDtool graphing engine: quickly displaying the raw RRD data while keeping a predefined storage size.
There are several graphing features available for plotting the data, the most commonly used types are:
- LINE: The data is drawn as a line, which can be formatted in width and type (for example, dashed line).
- VRULE: A fixed vertical line is drawn at a defined value.
- HRULE: A fixed horizontal line is drawn at a predefined value (for example, threshold limits).
- AREA: A solid filled area chart is drawn. Several area charts can be stacked together.
Each of these graph types can be combined together to build the final chart image.
Let us pe into the graph creation process here to get a better understanding of the RRDtool graphing capabilities.
You need to have the RRDtool in your path for the following commands to work.