The graph is still missing the Legend, so click on the Add link of the Graph Template Items again.
Select Comment as the GraphItemType.
Enter Running Processes into the Text Format field.
Click on the Create button.
Let's add some more statistical information to your Legend. Click on the Add link.
Select Legend as the GraphItemType.
Click on the Create button.
What just happened?
You have added a comment describing the statistical information relating to the graph. The Legend command adds three GPRINT statements to the graph. The first GPRINT statement prints the last polled value, the second statement prints the average value of the displayed graph and the last one prints the maximum value polled.
You can now assign this graph template to a device. After you have added the graph template to a device, you need to wait for three polls to pass. The first poll actually creates the necessary RRD file. The other two polls are needed for the RRDtool as it will start graphing values only when it has at least two data values within the RRD file. Once that time has passed, go to GraphManagement within the Management section and look for the graph there:
Tip
Turn on graph debugging mode
After turning on the graph debugging option, the graph management page will display the rrdtool graph command used to create the graph. Any errors, such as a missing RRD file, will be displayed here. This debugging information is useful for troubleshooting the graph generation.
Back to basics—rrdtool graph command
Let's look at the rrdtoolgraph command which Cacti uses to create the preceding graph.
Doesn't this one look familiar? It's roughly the same command which you hopefully came up with in the "Have a go hero" challenge in Chapter 2. Here you can see the tight integration of the rrdtool with the Cacti web interface.